{"action":"created","comment":{"url":"https://api.github.com/repos/airbnb/enzyme/pulls/comments/211827569","pull_request_review_id":148330804,"id":211827569,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTgyNzU2OQ==","diff_hunk":"@@ -446,6 +447,14 @@ class ShallowWrapper {\n         const prevProps = instance.props;\n         const prevState = instance.state;\n         const prevContext = instance.context;\n+\n+        if (typeof state === 'function') {\n+          state = state.call(instance, prevState, prevProps);","path":"packages/enzyme/src/ShallowWrapper.js","position":14,"original_position":14,"commit_id":"b048ce3a0dd4f6c55aae7115cd8afedce7ce98c0","original_commit_id":"b048ce3a0dd4f6c55aae7115cd8afedce7ce98c0","user":{"login":"ljharb","id":45469,"node_id":"MDQ6VXNlcjQ1NDY5","avatar_url":"https://avatars1.githubusercontent.com/u/45469?v=4","gravatar_id":"","url":"https://api.github.com/users/ljharb","html_url":"https://github.com/ljharb","followers_url":"https://api.github.com/users/ljharb/followers","following_url":"https://api.github.com/users/ljharb/following{/other_user}","gists_url":"https://api.github.com/users/ljharb/gists{/gist_id}","starred_url":"https://api.github.com/users/ljharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ljharb/subscriptions","organizations_url":"https://api.github.com/users/ljharb/orgs","repos_url":"https://api.github.com/users/ljharb/repos","events_url":"https://api.github.com/users/ljharb/events{/privacy}","received_events_url":"https://api.github.com/users/ljharb/received_events","type":"User","site_admin":false},"body":"i'll tweak this to avoid reassignment","created_at":"2018-08-22T04:44:25Z","updated_at":"2018-08-22T04:44:50Z","html_url":"https://github.com/airbnb/enzyme/pull/1785#discussion_r211827569","pull_request_url":"https://api.github.com/repos/airbnb/enzyme/pulls/1785","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/comments/211827569"},"html":{"href":"https://github.com/airbnb/enzyme/pull/1785#discussion_r211827569"},"pull_request":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/1785"}}},"pull_request":{"url":"https://api.github.com/repos/airbnb/enzyme/pulls/1785","id":210012293,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMDEyMjkz","html_url":"https://github.com/airbnb/enzyme/pull/1785","diff_url":"https://github.com/airbnb/enzyme/pull/1785.diff","patch_url":"https://github.com/airbnb/enzyme/pull/1785.patch","issue_url":"https://api.github.com/repos/airbnb/enzyme/issues/1785","number":1785,"state":"open","locked":false,"title":"Fix to skip updates when nextState is null or undefined","user":{"login":"koba04","id":250407,"node_id":"MDQ6VXNlcjI1MDQwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/250407?v=4","gravatar_id":"","url":"https://api.github.com/users/koba04","html_url":"https://github.com/koba04","followers_url":"https://api.github.com/users/koba04/followers","following_url":"https://api.github.com/users/koba04/following{/other_user}","gists_url":"https://api.github.com/users/koba04/gists{/gist_id}","starred_url":"https://api.github.com/users/koba04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koba04/subscriptions","organizations_url":"https://api.github.com/users/koba04/orgs","repos_url":"https://api.github.com/users/koba04/repos","events_url":"https://api.github.com/users/koba04/events{/privacy}","received_events_url":"https://api.github.com/users/koba04/received_events","type":"User","site_admin":false},"body":"Fix #1783 \r\nThis PR makes to prevent updates when setState returns `null` or `undefined`.\r\nBut the callback of setState's 2nd arguments should always be called as well as a behavior of ReactDOM.","created_at":"2018-08-22T03:39:40Z","updated_at":"2018-08-22T04:44:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5c79784bab91dd5aff2fd6bee17ac10a322c455e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/airbnb/enzyme/pulls/1785/commits","review_comments_url":"https://api.github.com/repos/airbnb/enzyme/pulls/1785/comments","review_comment_url":"https://api.github.com/repos/airbnb/enzyme/pulls/comments{/number}","comments_url":"https://api.github.com/repos/airbnb/enzyme/issues/1785/comments","statuses_url":"https://api.github.com/repos/airbnb/enzyme/statuses/b048ce3a0dd4f6c55aae7115cd8afedce7ce98c0","head":{"label":"koba04:setState-returning-null-or-undefined-is-noop","ref":"setState-returning-null-or-undefined-is-noop","sha":"b048ce3a0dd4f6c55aae7115cd8afedce7ce98c0","user":{"login":"koba04","id":250407,"node_id":"MDQ6VXNlcjI1MDQwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/250407?v=4","gravatar_id":"","url":"https://api.github.com/users/koba04","html_url":"https://github.com/koba04","followers_url":"https://api.github.com/users/koba04/followers","following_url":"https://api.github.com/users/koba04/following{/other_user}","gists_url":"https://api.github.com/users/koba04/gists{/gist_id}","starred_url":"https://api.github.com/users/koba04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koba04/subscriptions","organizations_url":"https://api.github.com/users/koba04/orgs","repos_url":"https://api.github.com/users/koba04/repos","events_url":"https://api.github.com/users/koba04/events{/privacy}","received_events_url":"https://api.github.com/users/koba04/received_events","type":"User","site_admin":false},"repo":{"id":52579445,"node_id":"MDEwOlJlcG9zaXRvcnk1MjU3OTQ0NQ==","name":"enzyme","full_name":"koba04/enzyme","owner":{"login":"koba04","id":250407,"node_id":"MDQ6VXNlcjI1MDQwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/250407?v=4","gravatar_id":"","url":"https://api.github.com/users/koba04","html_url":"https://github.com/koba04","followers_url":"https://api.github.com/users/koba04/followers","following_url":"https://api.github.com/users/koba04/following{/other_user}","gists_url":"https://api.github.com/users/koba04/gists{/gist_id}","starred_url":"https://api.github.com/users/koba04/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koba04/subscriptions","organizations_url":"https://api.github.com/users/koba04/orgs","repos_url":"https://api.github.com/users/koba04/repos","events_url":"https://api.github.com/users/koba04/events{/privacy}","received_events_url":"https://api.github.com/users/koba04/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/koba04/enzyme","description":"JavaScript Testing utilities for React","fork":true,"url":"https://api.github.com/repos/koba04/enzyme","forks_url":"https://api.github.com/repos/koba04/enzyme/forks","keys_url":"https://api.github.com/repos/koba04/enzyme/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koba04/enzyme/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koba04/enzyme/teams","hooks_url":"https://api.github.com/repos/koba04/enzyme/hooks","issue_events_url":"https://api.github.com/repos/koba04/enzyme/issues/events{/number}","events_url":"https://api.github.com/repos/koba04/enzyme/events","assignees_url":"https://api.github.com/repos/koba04/enzyme/assignees{/user}","branches_url":"https://api.github.com/repos/koba04/enzyme/branches{/branch}","tags_url":"https://api.github.com/repos/koba04/enzyme/tags","blobs_url":"https://api.github.com/repos/koba04/enzyme/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koba04/enzyme/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koba04/enzyme/git/refs{/sha}","trees_url":"https://api.github.com/repos/koba04/enzyme/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koba04/enzyme/statuses/{sha}","languages_url":"https://api.github.com/repos/koba04/enzyme/languages","stargazers_url":"https://api.github.com/repos/koba04/enzyme/stargazers","contributors_url":"https://api.github.com/repos/koba04/enzyme/contributors","subscribers_url":"https://api.github.com/repos/koba04/enzyme/subscribers","subscription_url":"https://api.github.com/repos/koba04/enzyme/subscription","commits_url":"https://api.github.com/repos/koba04/enzyme/commits{/sha}","git_commits_url":"https://api.github.com/repos/koba04/enzyme/git/commits{/sha}","comments_url":"https://api.github.com/repos/koba04/enzyme/comments{/number}","issue_comment_url":"https://api.github.com/repos/koba04/enzyme/issues/comments{/number}","contents_url":"https://api.github.com/repos/koba04/enzyme/contents/{+path}","compare_url":"https://api.github.com/repos/koba04/enzyme/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koba04/enzyme/merges","archive_url":"https://api.github.com/repos/koba04/enzyme/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koba04/enzyme/downloads","issues_url":"https://api.github.com/repos/koba04/enzyme/issues{/number}","pulls_url":"https://api.github.com/repos/koba04/enzyme/pulls{/number}","milestones_url":"https://api.github.com/repos/koba04/enzyme/milestones{/number}","notifications_url":"https://api.github.com/repos/koba04/enzyme/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koba04/enzyme/labels{/name}","releases_url":"https://api.github.com/repos/koba04/enzyme/releases{/id}","deployments_url":"https://api.github.com/repos/koba04/enzyme/deployments","created_at":"2016-02-26T04:49:38Z","updated_at":"2016-02-26T04:49:40Z","pushed_at":"2018-08-22T04:35:32Z","git_url":"git://github.com/koba04/enzyme.git","ssh_url":"git@github.com:koba04/enzyme.git","clone_url":"https://github.com/koba04/enzyme.git","svn_url":"https://github.com/koba04/enzyme","homepage":"http://airbnb.io/enzyme/","size":4102,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"airbnb:master","ref":"master","sha":"8bc36357e0d3d0217640ea36af4c284e362003df","user":{"login":"airbnb","id":698437,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5ODQzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/698437?v=4","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":45942274,"node_id":"MDEwOlJlcG9zaXRvcnk0NTk0MjI3NA==","name":"enzyme","full_name":"airbnb/enzyme","owner":{"login":"airbnb","id":698437,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5ODQzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/698437?v=4","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbnb/enzyme","description":"JavaScript Testing utilities for React","fork":false,"url":"https://api.github.com/repos/airbnb/enzyme","forks_url":"https://api.github.com/repos/airbnb/enzyme/forks","keys_url":"https://api.github.com/repos/airbnb/enzyme/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/enzyme/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/enzyme/teams","hooks_url":"https://api.github.com/repos/airbnb/enzyme/hooks","issue_events_url":"https://api.github.com/repos/airbnb/enzyme/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/enzyme/events","assignees_url":"https://api.github.com/repos/airbnb/enzyme/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/enzyme/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/enzyme/tags","blobs_url":"https://api.github.com/repos/airbnb/enzyme/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/enzyme/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/enzyme/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/enzyme/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/enzyme/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/enzyme/languages","stargazers_url":"https://api.github.com/repos/airbnb/enzyme/stargazers","contributors_url":"https://api.github.com/repos/airbnb/enzyme/contributors","subscribers_url":"https://api.github.com/repos/airbnb/enzyme/subscribers","subscription_url":"https://api.github.com/repos/airbnb/enzyme/subscription","commits_url":"https://api.github.com/repos/airbnb/enzyme/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/enzyme/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/enzyme/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/enzyme/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/enzyme/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/enzyme/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/enzyme/merges","archive_url":"https://api.github.com/repos/airbnb/enzyme/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/enzyme/downloads","issues_url":"https://api.github.com/repos/airbnb/enzyme/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/enzyme/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/enzyme/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/enzyme/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/enzyme/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/enzyme/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/enzyme/deployments","created_at":"2015-11-10T21:45:38Z","updated_at":"2018-08-22T02:47:42Z","pushed_at":"2018-08-22T04:36:09Z","git_url":"git://github.com/airbnb/enzyme.git","ssh_url":"git@github.com:airbnb/enzyme.git","clone_url":"https://github.com/airbnb/enzyme.git","svn_url":"https://github.com/airbnb/enzyme","homepage":"http://airbnb.io/enzyme/","size":4954,"stargazers_count":14898,"watchers_count":14898,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1602,"mirror_url":null,"archived":false,"open_issues_count":173,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1602,"open_issues":173,"watchers":14898,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/1785"},"html":{"href":"https://github.com/airbnb/enzyme/pull/1785"},"issue":{"href":"https://api.github.com/repos/airbnb/enzyme/issues/1785"},"comments":{"href":"https://api.github.com/repos/airbnb/enzyme/issues/1785/comments"},"review_comments":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/1785/comments"},"review_comment":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/airbnb/enzyme/pulls/1785/commits"},"statuses":{"href":"https://api.github.com/repos/airbnb/enzyme/statuses/b048ce3a0dd4f6c55aae7115cd8afedce7ce98c0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ljharb"}}