{"action":"created","issue":{"url":"https://api.github.com/repos/benceg/vanilla-modal/issues/45","repository_url":"https://api.github.com/repos/benceg/vanilla-modal","labels_url":"https://api.github.com/repos/benceg/vanilla-modal/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/benceg/vanilla-modal/issues/45/comments","events_url":"https://api.github.com/repos/benceg/vanilla-modal/issues/45/events","html_url":"https://github.com/benceg/vanilla-modal/issues/45","id":324660440,"number":45,"title":"Exception thrown in releaseNode when this.current is empty","user":{"login":"joallard","id":949482,"avatar_url":"https://avatars0.githubusercontent.com/u/949482?v=4","gravatar_id":"","url":"https://api.github.com/users/joallard","html_url":"https://github.com/joallard","followers_url":"https://api.github.com/users/joallard/followers","following_url":"https://api.github.com/users/joallard/following{/other_user}","gists_url":"https://api.github.com/users/joallard/gists{/gist_id}","starred_url":"https://api.github.com/users/joallard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joallard/subscriptions","organizations_url":"https://api.github.com/users/joallard/orgs","repos_url":"https://api.github.com/users/joallard/repos","events_url":"https://api.github.com/users/joallard/events{/privacy}","received_events_url":"https://api.github.com/users/joallard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-19T21:06:08Z","updated_at":"2018-05-23T14:45:01Z","closed_at":null,"author_association":"NONE","body":"When recreating the demo scenario, I'm getting the following error:\r\n```\r\nindex.js?24b6:317 Uncaught TypeError: Cannot read property 'appendChild' of null\r\n    at VanillaModal.releaseNode (index.js?24b6:317)\r\n    at VanillaModal.open (index.js?24b6:226)\r\n    at VanillaModal.delegateOpen (index.js?24b6:355)\r\n```\r\n(Reproduced on master and latest npm)\r\n\r\nSo on first invocation, `open` calls `releaseNode(this.current = null)`. Then `releaseNode` calls `node.appendChild`, but with `node` being `null`.\r\n\r\nIt seems very weird to me, because I don't know how the whole library could ever work at all if that's the case.\r\n\r\nI dug through the blame a little, and seems like a null check was removed at some point:\r\n\r\nhttps://github.com/benceg/vanilla-modal/commit/4b64ede7f904992f56bb562e0e1b5dc4229b3ff5#diff-168726dbe96b3ce427e7fedce31bb0bcL222\r\n\r\nAm I deeply mistaken or do master and the last releases have a critical error? I'm puzzled here."},"comment":{"url":"https://api.github.com/repos/benceg/vanilla-modal/issues/comments/391374048","html_url":"https://github.com/benceg/vanilla-modal/issues/45#issuecomment-391374048","issue_url":"https://api.github.com/repos/benceg/vanilla-modal/issues/45","id":391374048,"user":{"login":"TheFourthDev","id":4984882,"avatar_url":"https://avatars3.githubusercontent.com/u/4984882?v=4","gravatar_id":"","url":"https://api.github.com/users/TheFourthDev","html_url":"https://github.com/TheFourthDev","followers_url":"https://api.github.com/users/TheFourthDev/followers","following_url":"https://api.github.com/users/TheFourthDev/following{/other_user}","gists_url":"https://api.github.com/users/TheFourthDev/gists{/gist_id}","starred_url":"https://api.github.com/users/TheFourthDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheFourthDev/subscriptions","organizations_url":"https://api.github.com/users/TheFourthDev/orgs","repos_url":"https://api.github.com/users/TheFourthDev/repos","events_url":"https://api.github.com/users/TheFourthDev/events{/privacy}","received_events_url":"https://api.github.com/users/TheFourthDev/received_events","type":"User","site_admin":false},"created_at":"2018-05-23T14:45:01Z","updated_at":"2018-05-23T14:45:01Z","author_association":"NONE","body":"I can confirm the same problem. Thanks for opening an issue @joallard 👍"}}
{"actor":{"display_login":"TheFourthDev"}}