{"action":"created","issue":{"url":"https://api.github.com/repos/yyx990803/vue/issues/678","labels_url":"https://api.github.com/repos/yyx990803/vue/issues/678/labels{/name}","comments_url":"https://api.github.com/repos/yyx990803/vue/issues/678/comments","events_url":"https://api.github.com/repos/yyx990803/vue/issues/678/events","html_url":"https://github.com/yyx990803/vue/issues/678","id":54438092,"number":678,"title":"_directives.length ERROR: Cannot read property 'length' of null","user":{"login":"kvdmolen","id":2168968,"avatar_url":"https://avatars.githubusercontent.com/u/2168968?v=3","gravatar_id":"","url":"https://api.github.com/users/kvdmolen","html_url":"https://github.com/kvdmolen","followers_url":"https://api.github.com/users/kvdmolen/followers","following_url":"https://api.github.com/users/kvdmolen/following{/other_user}","gists_url":"https://api.github.com/users/kvdmolen/gists{/gist_id}","starred_url":"https://api.github.com/users/kvdmolen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvdmolen/subscriptions","organizations_url":"https://api.github.com/users/kvdmolen/orgs","repos_url":"https://api.github.com/users/kvdmolen/repos","events_url":"https://api.github.com/users/kvdmolen/events{/privacy}","received_events_url":"https://api.github.com/users/kvdmolen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-15T11:18:35Z","updated_at":"2015-02-07T01:16:38Z","closed_at":null,"body":"Using Vueify in an app (compiled in DEV) I get the following error:\r\n```javascript\r\nUncaught TypeError: Cannot read property 'length' of null\r\n```\r\nFrom script.js:7557\r\n```javascript\r\nvar originalDirCount = vm._directives.length\r\n```\r\nI use no custom directives. Error occurs only sometimes, very weird.\r\n\r\nAny idea anyone?\r\nThanks!\r\n\r\nMore context on script.js:\r\n```javascript\r\n/**\r\n\t   * A linker function to be called on a already compiled\r\n\t   * piece of DOM, which instantiates all directive\r\n\t   * instances.\r\n\t   *\r\n\t   * @param {Vue} vm\r\n\t   * @param {Element|DocumentFragment} el\r\n\t   * @return {Function|undefined}\r\n\t   */\r\n\t\r\n\t  return function link (vm, el) {\r\n\t    var originalDirCount = vm._directives.length\r\n\t    if (paramsLinkFn) paramsLinkFn(vm, el)\r\n\t    if (nodeLinkFn) nodeLinkFn(vm, el)\r\n\t    if (childLinkFn) childLinkFn(vm, el.childNodes)\r\n```"},"comment":{"url":"https://api.github.com/repos/yyx990803/vue/issues/comments/73342093","html_url":"https://github.com/yyx990803/vue/issues/678#issuecomment-73342093","issue_url":"https://api.github.com/repos/yyx990803/vue/issues/678","id":73342093,"user":{"login":"jcoffland","id":1166284,"avatar_url":"https://avatars.githubusercontent.com/u/1166284?v=3","gravatar_id":"","url":"https://api.github.com/users/jcoffland","html_url":"https://github.com/jcoffland","followers_url":"https://api.github.com/users/jcoffland/followers","following_url":"https://api.github.com/users/jcoffland/following{/other_user}","gists_url":"https://api.github.com/users/jcoffland/gists{/gist_id}","starred_url":"https://api.github.com/users/jcoffland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcoffland/subscriptions","organizations_url":"https://api.github.com/users/jcoffland/orgs","repos_url":"https://api.github.com/users/jcoffland/repos","events_url":"https://api.github.com/users/jcoffland/events{/privacy}","received_events_url":"https://api.github.com/users/jcoffland/received_events","type":"User","site_admin":false},"created_at":"2015-02-07T01:16:38Z","updated_at":"2015-02-07T01:16:38Z","body":"Please see my comment on issue #654 above.  I believe these issue are not the same but are related.\r\n\r\nEvents can cause components to be added or removed by changing variables which effect ```v-if``` or ```v-compoent=\"{{someVar}}\"```.  This alters event propagation.  In the case of #654, the list of event listeners may change while the event code is traversing that same list.\r\n\r\nI think the event propagation code should make a copy of the event listener list when it begins processing the list.  Then while iterating through the list it should check that each listener still exists before calling ```update()```."}}