{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/2","repository_url":"https://api.github.com/repos/elm-lang/virtual-dom","labels_url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/2/comments","events_url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/2/events","html_url":"https://github.com/elm-lang/virtual-dom/issues/2","id":152902533,"number":2,"title":"TypeError: domNode.elm_event_node_ref is undefined","user":{"login":"colinmccabe","id":5923214,"avatar_url":"https://avatars.githubusercontent.com/u/5923214?v=3","gravatar_id":"","url":"https://api.github.com/users/colinmccabe","html_url":"https://github.com/colinmccabe","followers_url":"https://api.github.com/users/colinmccabe/followers","following_url":"https://api.github.com/users/colinmccabe/following{/other_user}","gists_url":"https://api.github.com/users/colinmccabe/gists{/gist_id}","starred_url":"https://api.github.com/users/colinmccabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinmccabe/subscriptions","organizations_url":"https://api.github.com/users/colinmccabe/orgs","repos_url":"https://api.github.com/users/colinmccabe/repos","events_url":"https://api.github.com/users/colinmccabe/events{/privacy}","received_events_url":"https://api.github.com/users/colinmccabe/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-05-04T00:07:19Z","updated_at":"2016-10-25T17:14:41Z","closed_at":"2016-05-05T03:36:42Z","body":"https://gist.github.com/colinmccabe/56abf3c8a602834401cac1933c38ba7f\r\n\r\nThe program above results in a `TypeError: domNode.elm_event_node_ref is undefined` exception on this line: https://github.com/elm-lang/virtual-dom/blob/1.0.0/src/Native/VirtualDom.js#L914\r\n\r\nIt has something to do with this code that returns either a div or a table from a case and then (pointlessly) feeds the result into `Html.App.map`.\r\n\r\n```elm\r\nview : Model -> Html.Html Msg\r\nview model =\r\n  let html =\r\n    case model of\r\n      [] ->\r\n        Html.div [] [ Html.text \"No items, displaying div with text\" ]\r\n\r\n      xs ->\r\n        viewTable xs\r\n  in\r\n    Html.App.map (\\_ -> NoOp) html\r\n\r\nviewTable : Model -> Html.Html a\r\nviewTable model =\r\n  Html.table ...\r\n```\r\n\r\nRemoving the case so that `html` is always a table or removing `Html.App.map` makes the exception go away.\r\n\r\nInterestingly, virtual-dom successfully renders the table on the first tick, and the exception occurs on the second tick."},"comment":{"url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/comments/256099500","html_url":"https://github.com/elm-lang/virtual-dom/issues/2#issuecomment-256099500","issue_url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/2","id":256099500,"user":{"login":"evancz","id":1658058,"avatar_url":"https://avatars.githubusercontent.com/u/1658058?v=3","gravatar_id":"","url":"https://api.github.com/users/evancz","html_url":"https://github.com/evancz","followers_url":"https://api.github.com/users/evancz/followers","following_url":"https://api.github.com/users/evancz/following{/other_user}","gists_url":"https://api.github.com/users/evancz/gists{/gist_id}","starred_url":"https://api.github.com/users/evancz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evancz/subscriptions","organizations_url":"https://api.github.com/users/evancz/orgs","repos_url":"https://api.github.com/users/evancz/repos","events_url":"https://api.github.com/users/evancz/events{/privacy}","received_events_url":"https://api.github.com/users/evancz/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T17:14:41Z","updated_at":"2016-10-25T17:14:41Z","body":"Please open a new issue about this!"}}
{"actor":{"display_login":"evancz"}}