Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when directive is updated #30

Open
alex3683 opened this issue May 30, 2018 · 2 comments
Open

Error when directive is updated #30

alex3683 opened this issue May 30, 2018 · 2 comments

Comments

@alex3683
Copy link

Whenever the directive's update method is called I get this error:

13:59:38.227 vue.runtime.esm.js:1737 TypeError: Cannot read property 'context' of undefined
    at bind (vue-clickaway.common.js:22)
    at update (vue-clickaway.common.js:72)
    at callHook$1 (vue.runtime.esm.js:6289)
    at _update (vue.runtime.esm.js:6218)
    at Array.updateDirectives (vue.runtime.esm.js:6192)
    at patchVnode (vue.runtime.esm.js:5927)
    at updateChildren (vue.runtime.esm.js:5818)
    at patchVnode (vue.runtime.esm.js:5932)
    at VueComponent.patch [as __patch__] (vue.runtime.esm.js:6092)
    at VueComponent.Vue._update (vue.runtime.esm.js:2666)

The issue arose after updating from 2.1.0 to 2.2.2. So I had a look at relevant changes and found this new line https://github.com/simplesmiler/vue-clickaway/blob/master/dist/vue-clickaway.common.js#L22
The stack trace indicates that bind was called via update. When looking at update it's very clear, that the vnode argument is not passed on to bind, hence the error (https://github.com/simplesmiler/vue-clickaway/blob/master/dist/vue-clickaway.common.js#L70-L72)

@joshiste
Copy link

joshiste commented Jun 8, 2018

this duplicates #29 ...

@alex3683
Copy link
Author

@joshiste Ah, sorry, didn't look at the pull requests, if there already was a proposed fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants