{"action":"created","comment":{"url":"https://api.github.com/repos/mobxjs/mobx/pulls/comments/79496927","id":79496927,"diff_hunk":"@@ -0,0 +1,20 @@\n+var test = require('tape');\n+var mobx = require('..');\n+var observable = mobx.observable;\n+var toJS = mobx.toJS;\n+\n+test('toJS should ignore HTMLElement', function(t) {\n+\tif (typeof document !== 'object') {\n+\t\treturn t.end();\n+\t}\n+\n+\tvar image = observable(document.createElement('img'));\n+\n+\ttry {\n+\t\ttoJS(image);\n+\t} catch (err) {\n+\t\tt.error(err);\n+\t}\n+\n+\tt.end();","path":"test/tojs.js","position":19,"original_position":19,"commit_id":"91c1729c09badf7603e7bc9d9ea6ffb3742c6515","original_commit_id":"91c1729c09badf7603e7bc9d9ea6ffb3742c6515","user":{"login":"andykog","id":6760207,"avatar_url":"https://avatars.githubusercontent.com/u/6760207?v=3","gravatar_id":"","url":"https://api.github.com/users/andykog","html_url":"https://github.com/andykog","followers_url":"https://api.github.com/users/andykog/followers","following_url":"https://api.github.com/users/andykog/following{/other_user}","gists_url":"https://api.github.com/users/andykog/gists{/gist_id}","starred_url":"https://api.github.com/users/andykog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andykog/subscriptions","organizations_url":"https://api.github.com/users/andykog/orgs","repos_url":"https://api.github.com/users/andykog/repos","events_url":"https://api.github.com/users/andykog/events{/privacy}","received_events_url":"https://api.github.com/users/andykog/received_events","type":"User","site_admin":false},"body":"I would also check if toJS(image) === image","created_at":"2016-09-19T21:48:02Z","updated_at":"2016-09-19T21:48:02Z","html_url":"https://github.com/mobxjs/mobx/pull/568#discussion_r79496927","pull_request_url":"https://api.github.com/repos/mobxjs/mobx/pulls/568","_links":{"self":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/comments/79496927"},"html":{"href":"https://github.com/mobxjs/mobx/pull/568#discussion_r79496927"},"pull_request":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/568"}}},"pull_request":{"url":"https://api.github.com/repos/mobxjs/mobx/pulls/568","id":85870505,"html_url":"https://github.com/mobxjs/mobx/pull/568","diff_url":"https://github.com/mobxjs/mobx/pull/568.diff","patch_url":"https://github.com/mobxjs/mobx/pull/568.patch","issue_url":"https://api.github.com/repos/mobxjs/mobx/issues/568","number":568,"state":"open","locked":false,"title":"Prevent RangeError when calling toJS on HTMLElement","user":{"login":"maxdeviant","id":1486634,"avatar_url":"https://avatars.githubusercontent.com/u/1486634?v=3","gravatar_id":"","url":"https://api.github.com/users/maxdeviant","html_url":"https://github.com/maxdeviant","followers_url":"https://api.github.com/users/maxdeviant/followers","following_url":"https://api.github.com/users/maxdeviant/following{/other_user}","gists_url":"https://api.github.com/users/maxdeviant/gists{/gist_id}","starred_url":"https://api.github.com/users/maxdeviant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxdeviant/subscriptions","organizations_url":"https://api.github.com/users/maxdeviant/orgs","repos_url":"https://api.github.com/users/maxdeviant/repos","events_url":"https://api.github.com/users/maxdeviant/events{/privacy}","received_events_url":"https://api.github.com/users/maxdeviant/received_events","type":"User","site_admin":false},"body":"This fixes #566.\r\n\r\nI plugged this fix into the compiled MobX lib in our codebase and verified that it fixed the problem we were seeing there.\r\n\r\nOnce I'm back on my OS X machine I can run the browser tests to ensure that the added test breaks without the fix. Sadly can't run the `small-build.sh` script on Windows :cry: ","created_at":"2016-09-19T21:12:10Z","updated_at":"2016-09-19T21:55:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ca2fe669451720362ce253a9178a98b614b7d92","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mobxjs/mobx/pulls/568/commits","review_comments_url":"https://api.github.com/repos/mobxjs/mobx/pulls/568/comments","review_comment_url":"https://api.github.com/repos/mobxjs/mobx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mobxjs/mobx/issues/568/comments","statuses_url":"https://api.github.com/repos/mobxjs/mobx/statuses/91c1729c09badf7603e7bc9d9ea6ffb3742c6515","head":{"label":"maxdeviant:htmlelement-tojs","ref":"htmlelement-tojs","sha":"91c1729c09badf7603e7bc9d9ea6ffb3742c6515","user":{"login":"maxdeviant","id":1486634,"avatar_url":"https://avatars.githubusercontent.com/u/1486634?v=3","gravatar_id":"","url":"https://api.github.com/users/maxdeviant","html_url":"https://github.com/maxdeviant","followers_url":"https://api.github.com/users/maxdeviant/followers","following_url":"https://api.github.com/users/maxdeviant/following{/other_user}","gists_url":"https://api.github.com/users/maxdeviant/gists{/gist_id}","starred_url":"https://api.github.com/users/maxdeviant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxdeviant/subscriptions","organizations_url":"https://api.github.com/users/maxdeviant/orgs","repos_url":"https://api.github.com/users/maxdeviant/repos","events_url":"https://api.github.com/users/maxdeviant/events{/privacy}","received_events_url":"https://api.github.com/users/maxdeviant/received_events","type":"User","site_admin":false},"repo":{"id":68641404,"name":"mobx","full_name":"maxdeviant/mobx","owner":{"login":"maxdeviant","id":1486634,"avatar_url":"https://avatars.githubusercontent.com/u/1486634?v=3","gravatar_id":"","url":"https://api.github.com/users/maxdeviant","html_url":"https://github.com/maxdeviant","followers_url":"https://api.github.com/users/maxdeviant/followers","following_url":"https://api.github.com/users/maxdeviant/following{/other_user}","gists_url":"https://api.github.com/users/maxdeviant/gists{/gist_id}","starred_url":"https://api.github.com/users/maxdeviant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxdeviant/subscriptions","organizations_url":"https://api.github.com/users/maxdeviant/orgs","repos_url":"https://api.github.com/users/maxdeviant/repos","events_url":"https://api.github.com/users/maxdeviant/events{/privacy}","received_events_url":"https://api.github.com/users/maxdeviant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maxdeviant/mobx","description":"Simple, scalable state management.","fork":true,"url":"https://api.github.com/repos/maxdeviant/mobx","forks_url":"https://api.github.com/repos/maxdeviant/mobx/forks","keys_url":"https://api.github.com/repos/maxdeviant/mobx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maxdeviant/mobx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maxdeviant/mobx/teams","hooks_url":"https://api.github.com/repos/maxdeviant/mobx/hooks","issue_events_url":"https://api.github.com/repos/maxdeviant/mobx/issues/events{/number}","events_url":"https://api.github.com/repos/maxdeviant/mobx/events","assignees_url":"https://api.github.com/repos/maxdeviant/mobx/assignees{/user}","branches_url":"https://api.github.com/repos/maxdeviant/mobx/branches{/branch}","tags_url":"https://api.github.com/repos/maxdeviant/mobx/tags","blobs_url":"https://api.github.com/repos/maxdeviant/mobx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maxdeviant/mobx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maxdeviant/mobx/git/refs{/sha}","trees_url":"https://api.github.com/repos/maxdeviant/mobx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maxdeviant/mobx/statuses/{sha}","languages_url":"https://api.github.com/repos/maxdeviant/mobx/languages","stargazers_url":"https://api.github.com/repos/maxdeviant/mobx/stargazers","contributors_url":"https://api.github.com/repos/maxdeviant/mobx/contributors","subscribers_url":"https://api.github.com/repos/maxdeviant/mobx/subscribers","subscription_url":"https://api.github.com/repos/maxdeviant/mobx/subscription","commits_url":"https://api.github.com/repos/maxdeviant/mobx/commits{/sha}","git_commits_url":"https://api.github.com/repos/maxdeviant/mobx/git/commits{/sha}","comments_url":"https://api.github.com/repos/maxdeviant/mobx/comments{/number}","issue_comment_url":"https://api.github.com/repos/maxdeviant/mobx/issues/comments{/number}","contents_url":"https://api.github.com/repos/maxdeviant/mobx/contents/{+path}","compare_url":"https://api.github.com/repos/maxdeviant/mobx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maxdeviant/mobx/merges","archive_url":"https://api.github.com/repos/maxdeviant/mobx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maxdeviant/mobx/downloads","issues_url":"https://api.github.com/repos/maxdeviant/mobx/issues{/number}","pulls_url":"https://api.github.com/repos/maxdeviant/mobx/pulls{/number}","milestones_url":"https://api.github.com/repos/maxdeviant/mobx/milestones{/number}","notifications_url":"https://api.github.com/repos/maxdeviant/mobx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maxdeviant/mobx/labels{/name}","releases_url":"https://api.github.com/repos/maxdeviant/mobx/releases{/id}","deployments_url":"https://api.github.com/repos/maxdeviant/mobx/deployments","created_at":"2016-09-19T19:59:26Z","updated_at":"2016-09-19T19:59:27Z","pushed_at":"2016-09-19T21:05:30Z","git_url":"git://github.com/maxdeviant/mobx.git","ssh_url":"git@github.com:maxdeviant/mobx.git","clone_url":"https://github.com/maxdeviant/mobx.git","svn_url":"https://github.com/maxdeviant/mobx","homepage":"https://mobxjs.github.io/mobx","size":13264,"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":"mobxjs:master","ref":"master","sha":"883dc24d81a3d0cc38df7df6b6b5ca90636d17ed","user":{"login":"mobxjs","id":17475736,"avatar_url":"https://avatars.githubusercontent.com/u/17475736?v=3","gravatar_id":"","url":"https://api.github.com/users/mobxjs","html_url":"https://github.com/mobxjs","followers_url":"https://api.github.com/users/mobxjs/followers","following_url":"https://api.github.com/users/mobxjs/following{/other_user}","gists_url":"https://api.github.com/users/mobxjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mobxjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobxjs/subscriptions","organizations_url":"https://api.github.com/users/mobxjs/orgs","repos_url":"https://api.github.com/users/mobxjs/repos","events_url":"https://api.github.com/users/mobxjs/events{/privacy}","received_events_url":"https://api.github.com/users/mobxjs/received_events","type":"Organization","site_admin":false},"repo":{"id":32215970,"name":"mobx","full_name":"mobxjs/mobx","owner":{"login":"mobxjs","id":17475736,"avatar_url":"https://avatars.githubusercontent.com/u/17475736?v=3","gravatar_id":"","url":"https://api.github.com/users/mobxjs","html_url":"https://github.com/mobxjs","followers_url":"https://api.github.com/users/mobxjs/followers","following_url":"https://api.github.com/users/mobxjs/following{/other_user}","gists_url":"https://api.github.com/users/mobxjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mobxjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobxjs/subscriptions","organizations_url":"https://api.github.com/users/mobxjs/orgs","repos_url":"https://api.github.com/users/mobxjs/repos","events_url":"https://api.github.com/users/mobxjs/events{/privacy}","received_events_url":"https://api.github.com/users/mobxjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mobxjs/mobx","description":"Simple, scalable state management.","fork":false,"url":"https://api.github.com/repos/mobxjs/mobx","forks_url":"https://api.github.com/repos/mobxjs/mobx/forks","keys_url":"https://api.github.com/repos/mobxjs/mobx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mobxjs/mobx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mobxjs/mobx/teams","hooks_url":"https://api.github.com/repos/mobxjs/mobx/hooks","issue_events_url":"https://api.github.com/repos/mobxjs/mobx/issues/events{/number}","events_url":"https://api.github.com/repos/mobxjs/mobx/events","assignees_url":"https://api.github.com/repos/mobxjs/mobx/assignees{/user}","branches_url":"https://api.github.com/repos/mobxjs/mobx/branches{/branch}","tags_url":"https://api.github.com/repos/mobxjs/mobx/tags","blobs_url":"https://api.github.com/repos/mobxjs/mobx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mobxjs/mobx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mobxjs/mobx/git/refs{/sha}","trees_url":"https://api.github.com/repos/mobxjs/mobx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mobxjs/mobx/statuses/{sha}","languages_url":"https://api.github.com/repos/mobxjs/mobx/languages","stargazers_url":"https://api.github.com/repos/mobxjs/mobx/stargazers","contributors_url":"https://api.github.com/repos/mobxjs/mobx/contributors","subscribers_url":"https://api.github.com/repos/mobxjs/mobx/subscribers","subscription_url":"https://api.github.com/repos/mobxjs/mobx/subscription","commits_url":"https://api.github.com/repos/mobxjs/mobx/commits{/sha}","git_commits_url":"https://api.github.com/repos/mobxjs/mobx/git/commits{/sha}","comments_url":"https://api.github.com/repos/mobxjs/mobx/comments{/number}","issue_comment_url":"https://api.github.com/repos/mobxjs/mobx/issues/comments{/number}","contents_url":"https://api.github.com/repos/mobxjs/mobx/contents/{+path}","compare_url":"https://api.github.com/repos/mobxjs/mobx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mobxjs/mobx/merges","archive_url":"https://api.github.com/repos/mobxjs/mobx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mobxjs/mobx/downloads","issues_url":"https://api.github.com/repos/mobxjs/mobx/issues{/number}","pulls_url":"https://api.github.com/repos/mobxjs/mobx/pulls{/number}","milestones_url":"https://api.github.com/repos/mobxjs/mobx/milestones{/number}","notifications_url":"https://api.github.com/repos/mobxjs/mobx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mobxjs/mobx/labels{/name}","releases_url":"https://api.github.com/repos/mobxjs/mobx/releases{/id}","deployments_url":"https://api.github.com/repos/mobxjs/mobx/deployments","created_at":"2015-03-14T14:31:38Z","updated_at":"2016-09-19T21:24:09Z","pushed_at":"2016-09-19T21:12:10Z","git_url":"git://github.com/mobxjs/mobx.git","ssh_url":"git@github.com:mobxjs/mobx.git","clone_url":"https://github.com/mobxjs/mobx.git","svn_url":"https://github.com/mobxjs/mobx","homepage":"https://mobxjs.github.io/mobx","size":13264,"stargazers_count":4461,"watchers_count":4461,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":195,"mirror_url":null,"open_issues_count":46,"forks":195,"open_issues":46,"watchers":4461,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/568"},"html":{"href":"https://github.com/mobxjs/mobx/pull/568"},"issue":{"href":"https://api.github.com/repos/mobxjs/mobx/issues/568"},"comments":{"href":"https://api.github.com/repos/mobxjs/mobx/issues/568/comments"},"review_comments":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/568/comments"},"review_comment":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/568/commits"},"statuses":{"href":"https://api.github.com/repos/mobxjs/mobx/statuses/91c1729c09badf7603e7bc9d9ea6ffb3742c6515"}}}}
{"actor":{"display_login":"andykog"}}