{"action":"created","issue":{"url":"https://api.github.com/repos/mochajs/mocha/issues/1761","labels_url":"https://api.github.com/repos/mochajs/mocha/issues/1761/labels{/name}","comments_url":"https://api.github.com/repos/mochajs/mocha/issues/1761/comments","events_url":"https://api.github.com/repos/mochajs/mocha/issues/1761/events","html_url":"https://github.com/mochajs/mocha/pull/1761","id":90233311,"number":1761,"title":"Explicitly check `null` and `undefined` values in exports.type","user":{"login":"chromakode","id":16893,"avatar_url":"https://avatars.githubusercontent.com/u/16893?v=3","gravatar_id":"","url":"https://api.github.com/users/chromakode","html_url":"https://github.com/chromakode","followers_url":"https://api.github.com/users/chromakode/followers","following_url":"https://api.github.com/users/chromakode/following{/other_user}","gists_url":"https://api.github.com/users/chromakode/gists{/gist_id}","starred_url":"https://api.github.com/users/chromakode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chromakode/subscriptions","organizations_url":"https://api.github.com/users/chromakode/orgs","repos_url":"https://api.github.com/users/chromakode/repos","events_url":"https://api.github.com/users/chromakode/events{/privacy}","received_events_url":"https://api.github.com/users/chromakode/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mochajs/mocha/labels/pr-needs-work","name":"pr-needs-work","color":"970705"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-22T22:45:46Z","updated_at":"2015-06-23T18:26:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mochajs/mocha/pulls/1761","html_url":"https://github.com/mochajs/mocha/pull/1761","diff_url":"https://github.com/mochajs/mocha/pull/1761.diff","patch_url":"https://github.com/mochajs/mocha/pull/1761.patch"},"body":"Some older JS engines, such as PhantomJS, return the `window` object instead of \"[object Null]\", as would be expected here, crashing the test runner."},"comment":{"url":"https://api.github.com/repos/mochajs/mocha/issues/comments/114599531","html_url":"https://github.com/mochajs/mocha/pull/1761#issuecomment-114599531","issue_url":"https://api.github.com/repos/mochajs/mocha/issues/1761","id":114599531,"user":{"login":"chromakode","id":16893,"avatar_url":"https://avatars.githubusercontent.com/u/16893?v=3","gravatar_id":"","url":"https://api.github.com/users/chromakode","html_url":"https://github.com/chromakode","followers_url":"https://api.github.com/users/chromakode/followers","following_url":"https://api.github.com/users/chromakode/following{/other_user}","gists_url":"https://api.github.com/users/chromakode/gists{/gist_id}","starred_url":"https://api.github.com/users/chromakode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chromakode/subscriptions","organizations_url":"https://api.github.com/users/chromakode/orgs","repos_url":"https://api.github.com/users/chromakode/repos","events_url":"https://api.github.com/users/chromakode/events{/privacy}","received_events_url":"https://api.github.com/users/chromakode/received_events","type":"User","site_admin":false},"created_at":"2015-06-23T18:26:31Z","updated_at":"2015-06-23T18:26:31Z","body":"Ok @boneskull , added a test to replicate the behavior of PhantomJS and rebased. I also added a test for `type(undefined)` in the general case for consistency."}}