{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/templating/issues/160","labels_url":"https://api.github.com/repos/aurelia/templating/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/templating/issues/160/comments","events_url":"https://api.github.com/repos/aurelia/templating/issues/160/events","html_url":"https://github.com/aurelia/templating/issues/160","id":103798660,"number":160,"title":"ViewSlot::getAnimatableElement causes error : Cannot read property 'firstChild' of undefined","user":{"login":"sylvain-hamel","id":1754010,"avatar_url":"https://avatars.githubusercontent.com/u/1754010?v=3","gravatar_id":"","url":"https://api.github.com/users/sylvain-hamel","html_url":"https://github.com/sylvain-hamel","followers_url":"https://api.github.com/users/sylvain-hamel/followers","following_url":"https://api.github.com/users/sylvain-hamel/following{/other_user}","gists_url":"https://api.github.com/users/sylvain-hamel/gists{/gist_id}","starred_url":"https://api.github.com/users/sylvain-hamel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sylvain-hamel/subscriptions","organizations_url":"https://api.github.com/users/sylvain-hamel/orgs","repos_url":"https://api.github.com/users/sylvain-hamel/repos","events_url":"https://api.github.com/users/sylvain-hamel/events{/privacy}","received_events_url":"https://api.github.com/users/sylvain-hamel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-28T21:27:58Z","updated_at":"2015-09-09T03:27:39Z","closed_at":null,"body":"I have this bug where `ViewSlot.prototype.removeAt()` throws with `Cannot read property 'firstChild' of undefined` inside `getAnimatableElement` at line\r\n\r\n    function getAnimatableElement(view) {\r\n        var firstChild = view.firstChild;\r\n\r\nbecause `view` is `undefined`.\r\n\r\nThe stack trace shows it's processing a `if`\r\n```\r\ngetAnimatableElement (aurelia-templating.js:792)\r\nremoveAt (aurelia-templating.js:929)\r\nremove (aurelia-templating.js:910)\r\nvalueChanged (if.js:28)\r\nbind (if.js:22)\r\nbind (aurelia-templating.js:2102)\r\nbind (aurelia-templating.js:544)\r\nvalueChanged (if.js:44)\r\nBindableProperty.createObserver.selfSubscriber (aurelia-templating.js:2269)\r\ncall (aurelia-templating.js:2419)\r\nflushMicroTaskQueue (aurelia-task-queue.js:107)\r\n(anonymous function) (aurelia-task-queue.js:48)\r\n```\r\n\r\nI can reproduce it at will in my applicaton but I'm not able to isolate this problem. "},"comment":{"url":"https://api.github.com/repos/aurelia/templating/issues/comments/138768988","html_url":"https://github.com/aurelia/templating/issues/160#issuecomment-138768988","issue_url":"https://api.github.com/repos/aurelia/templating/issues/160","id":138768988,"user":{"login":"simonfox","id":186663,"avatar_url":"https://avatars.githubusercontent.com/u/186663?v=3","gravatar_id":"","url":"https://api.github.com/users/simonfox","html_url":"https://github.com/simonfox","followers_url":"https://api.github.com/users/simonfox/followers","following_url":"https://api.github.com/users/simonfox/following{/other_user}","gists_url":"https://api.github.com/users/simonfox/gists{/gist_id}","starred_url":"https://api.github.com/users/simonfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonfox/subscriptions","organizations_url":"https://api.github.com/users/simonfox/orgs","repos_url":"https://api.github.com/users/simonfox/repos","events_url":"https://api.github.com/users/simonfox/events{/privacy}","received_events_url":"https://api.github.com/users/simonfox/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T03:27:39Z","updated_at":"2015-09-09T03:27:39Z","body":"Possibly related to aurelia/templating-resources#103"}}