{"action":"created","comment":{"url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/comments/48448710","id":48448710,"diff_hunk":"@@ -50,7 +50,7 @@ function getPropType(propValue) {\n function createChainableTypeChecker(validate) {\n   function checkType(isRequired, props, propName, componentName, location) {\n     componentName = componentName || ANONYMOUS;\n-    if (props[propName] == null) {\n+    if (props[propName] === null) {","path":"src/ImmutablePropTypes.js","position":5,"original_position":5,"commit_id":"23fb26b11eb5e784b69145d774a24f127bfab547","original_commit_id":"23fb26b11eb5e784b69145d774a24f127bfab547","user":{"login":"MatthewHerbst","id":1287375,"avatar_url":"https://avatars.githubusercontent.com/u/1287375?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewHerbst","html_url":"https://github.com/MatthewHerbst","followers_url":"https://api.github.com/users/MatthewHerbst/followers","following_url":"https://api.github.com/users/MatthewHerbst/following{/other_user}","gists_url":"https://api.github.com/users/MatthewHerbst/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewHerbst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewHerbst/subscriptions","organizations_url":"https://api.github.com/users/MatthewHerbst/orgs","repos_url":"https://api.github.com/users/MatthewHerbst/repos","events_url":"https://api.github.com/users/MatthewHerbst/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewHerbst/received_events","type":"User","site_admin":false},"body":"Got it. It must have just been a reflexive fix for me - my local linter always bugs me about using `===` when comparing with `null`","created_at":"2015-12-26T18:06:31Z","updated_at":"2015-12-26T18:06:31Z","html_url":"https://github.com/HurricaneJames/react-immutable-proptypes/pull/17#discussion_r48448710","pull_request_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/comments/48448710"},"html":{"href":"https://github.com/HurricaneJames/react-immutable-proptypes/pull/17#discussion_r48448710"},"pull_request":{"href":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/17","id":54526039,"html_url":"https://github.com/HurricaneJames/react-immutable-proptypes/pull/17","diff_url":"https://github.com/HurricaneJames/react-immutable-proptypes/pull/17.diff","patch_url":"https://github.com/HurricaneJames/react-immutable-proptypes/pull/17.patch","issue_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/issues/17","number":17,"state":"open","locked":false,"title":"Bug fix for createIterableTypeChecker passing propValue incorrectly","user":{"login":"MatthewHerbst","id":1287375,"avatar_url":"https://avatars.githubusercontent.com/u/1287375?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewHerbst","html_url":"https://github.com/MatthewHerbst","followers_url":"https://api.github.com/users/MatthewHerbst/followers","following_url":"https://api.github.com/users/MatthewHerbst/following{/other_user}","gists_url":"https://api.github.com/users/MatthewHerbst/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewHerbst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewHerbst/subscriptions","organizations_url":"https://api.github.com/users/MatthewHerbst/orgs","repos_url":"https://api.github.com/users/MatthewHerbst/repos","events_url":"https://api.github.com/users/MatthewHerbst/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewHerbst/received_events","type":"User","site_admin":false},"body":"Let's say that the following is a validation I've set up in my component:\r\n\r\n```javascript\r\nimport React from 'react';\r\nimport ImmutablePropTypes from 'react-immutable-proptypes';\r\n\r\nvar MyComponent = React.createClass({\r\n  propTypes: {\r\n    someImmutableList: ImmutablePropTypes.listOf(myAwesomeListValidator)\r\n  },\r\n  render: function() {...}\r\n});\r\n\r\nfunction myAwesomeListValidator(list, idx, componentName, location) {\r\n  var currListItem = list.get(idx);\r\n  ...\r\n}\r\n```\r\n\r\nIf you try running the above, you will get an error along the lines of:\r\n\r\n```\r\nWarning: Failed propType: list.get is not a function ...\r\n```\r\n\r\nI literally spent hours trying to figure out what I had done to my prop to somehow make it not a list. But it didn't make any sense, since putting a `console.log(this.props.someImmutableList)` easily shows it is an Immutable list. Well, after some code hunting, I found this in the current source:\r\n\r\n```javascript\r\nvar propValues = propValue.toArray();\r\n```\r\n\r\nWell now it all makes total sense! So, this changes fixes this (what I deem a bug) by preserving the Immutable structure, and replacing the for loop for `forEach`, [a method that all Immutable.js structure inherit from Immutable.Iterable](http://facebook.github.io/immutable-js/docs/#/Iterable/forEach).\r\n\r\n*Warning:* this change will potentially break existing code for anyone who has provided a custom typechecker to `ImmutablePropTypes.listOf`. However, in the long run their code should change - ideally there is no reason to ever not use Immutable.js objects completely.","created_at":"2015-12-24T04:27:34Z","updated_at":"2015-12-26T18:06:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fc1411559c1e11d82eb6d451c49b38a849518d4c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/17/commits","review_comments_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/17/comments","review_comment_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/issues/17/comments","statuses_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/statuses/23fb26b11eb5e784b69145d774a24f127bfab547","head":{"label":"MatthewHerbst:bug/propValue-passes-as-non-immutable","ref":"bug/propValue-passes-as-non-immutable","sha":"23fb26b11eb5e784b69145d774a24f127bfab547","user":{"login":"MatthewHerbst","id":1287375,"avatar_url":"https://avatars.githubusercontent.com/u/1287375?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewHerbst","html_url":"https://github.com/MatthewHerbst","followers_url":"https://api.github.com/users/MatthewHerbst/followers","following_url":"https://api.github.com/users/MatthewHerbst/following{/other_user}","gists_url":"https://api.github.com/users/MatthewHerbst/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewHerbst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewHerbst/subscriptions","organizations_url":"https://api.github.com/users/MatthewHerbst/orgs","repos_url":"https://api.github.com/users/MatthewHerbst/repos","events_url":"https://api.github.com/users/MatthewHerbst/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewHerbst/received_events","type":"User","site_admin":false},"repo":{"id":48523919,"name":"react-immutable-proptypes","full_name":"MatthewHerbst/react-immutable-proptypes","owner":{"login":"MatthewHerbst","id":1287375,"avatar_url":"https://avatars.githubusercontent.com/u/1287375?v=3","gravatar_id":"","url":"https://api.github.com/users/MatthewHerbst","html_url":"https://github.com/MatthewHerbst","followers_url":"https://api.github.com/users/MatthewHerbst/followers","following_url":"https://api.github.com/users/MatthewHerbst/following{/other_user}","gists_url":"https://api.github.com/users/MatthewHerbst/gists{/gist_id}","starred_url":"https://api.github.com/users/MatthewHerbst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatthewHerbst/subscriptions","organizations_url":"https://api.github.com/users/MatthewHerbst/orgs","repos_url":"https://api.github.com/users/MatthewHerbst/repos","events_url":"https://api.github.com/users/MatthewHerbst/events{/privacy}","received_events_url":"https://api.github.com/users/MatthewHerbst/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MatthewHerbst/react-immutable-proptypes","description":"PropType validators that work with Immutable.js.","fork":true,"url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes","forks_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/forks","keys_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/teams","hooks_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/hooks","issue_events_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/issues/events{/number}","events_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/events","assignees_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/assignees{/user}","branches_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/branches{/branch}","tags_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/tags","blobs_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/git/refs{/sha}","trees_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/statuses/{sha}","languages_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/languages","stargazers_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/stargazers","contributors_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/contributors","subscribers_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/subscribers","subscription_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/subscription","commits_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/commits{/sha}","git_commits_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/git/commits{/sha}","comments_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/comments{/number}","issue_comment_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/issues/comments{/number}","contents_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/contents/{+path}","compare_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/merges","archive_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/downloads","issues_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/issues{/number}","pulls_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/pulls{/number}","milestones_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/milestones{/number}","notifications_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/labels{/name}","releases_url":"https://api.github.com/repos/MatthewHerbst/react-immutable-proptypes/releases{/id}","created_at":"2015-12-24T03:58:05Z","updated_at":"2015-12-24T03:58:05Z","pushed_at":"2015-12-24T04:13:51Z","git_url":"git://github.com/MatthewHerbst/react-immutable-proptypes.git","ssh_url":"git@github.com:MatthewHerbst/react-immutable-proptypes.git","clone_url":"https://github.com/MatthewHerbst/react-immutable-proptypes.git","svn_url":"https://github.com/MatthewHerbst/react-immutable-proptypes","homepage":null,"size":47,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HurricaneJames:master","ref":"master","sha":"aab4a4017ac35c70d934b2911827c3b36efa641f","user":{"login":"HurricaneJames","id":1138434,"avatar_url":"https://avatars.githubusercontent.com/u/1138434?v=3","gravatar_id":"","url":"https://api.github.com/users/HurricaneJames","html_url":"https://github.com/HurricaneJames","followers_url":"https://api.github.com/users/HurricaneJames/followers","following_url":"https://api.github.com/users/HurricaneJames/following{/other_user}","gists_url":"https://api.github.com/users/HurricaneJames/gists{/gist_id}","starred_url":"https://api.github.com/users/HurricaneJames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HurricaneJames/subscriptions","organizations_url":"https://api.github.com/users/HurricaneJames/orgs","repos_url":"https://api.github.com/users/HurricaneJames/repos","events_url":"https://api.github.com/users/HurricaneJames/events{/privacy}","received_events_url":"https://api.github.com/users/HurricaneJames/received_events","type":"User","site_admin":false},"repo":{"id":33030201,"name":"react-immutable-proptypes","full_name":"HurricaneJames/react-immutable-proptypes","owner":{"login":"HurricaneJames","id":1138434,"avatar_url":"https://avatars.githubusercontent.com/u/1138434?v=3","gravatar_id":"","url":"https://api.github.com/users/HurricaneJames","html_url":"https://github.com/HurricaneJames","followers_url":"https://api.github.com/users/HurricaneJames/followers","following_url":"https://api.github.com/users/HurricaneJames/following{/other_user}","gists_url":"https://api.github.com/users/HurricaneJames/gists{/gist_id}","starred_url":"https://api.github.com/users/HurricaneJames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HurricaneJames/subscriptions","organizations_url":"https://api.github.com/users/HurricaneJames/orgs","repos_url":"https://api.github.com/users/HurricaneJames/repos","events_url":"https://api.github.com/users/HurricaneJames/events{/privacy}","received_events_url":"https://api.github.com/users/HurricaneJames/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HurricaneJames/react-immutable-proptypes","description":"PropType validators that work with Immutable.js.","fork":false,"url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes","forks_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/forks","keys_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/teams","hooks_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/hooks","issue_events_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/issues/events{/number}","events_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/events","assignees_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/assignees{/user}","branches_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/branches{/branch}","tags_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/tags","blobs_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/git/refs{/sha}","trees_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/statuses/{sha}","languages_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/languages","stargazers_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/stargazers","contributors_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/contributors","subscribers_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/subscribers","subscription_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/subscription","commits_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/commits{/sha}","git_commits_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/git/commits{/sha}","comments_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/comments{/number}","issue_comment_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/issues/comments{/number}","contents_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/contents/{+path}","compare_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/merges","archive_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/downloads","issues_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/issues{/number}","pulls_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls{/number}","milestones_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/milestones{/number}","notifications_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/labels{/name}","releases_url":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/releases{/id}","created_at":"2015-03-28T10:59:34Z","updated_at":"2015-12-26T13:14:38Z","pushed_at":"2015-12-26T17:03:20Z","git_url":"git://github.com/HurricaneJames/react-immutable-proptypes.git","ssh_url":"git@github.com:HurricaneJames/react-immutable-proptypes.git","clone_url":"https://github.com/HurricaneJames/react-immutable-proptypes.git","svn_url":"https://github.com/HurricaneJames/react-immutable-proptypes","homepage":null,"size":49,"stargazers_count":148,"watchers_count":148,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":148,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/17"},"html":{"href":"https://github.com/HurricaneJames/react-immutable-proptypes/pull/17"},"issue":{"href":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/issues/17"},"comments":{"href":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/HurricaneJames/react-immutable-proptypes/statuses/23fb26b11eb5e784b69145d774a24f127bfab547"}}}}