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

TypeError: item.destroy is not a function #380

Open
citricacid-pl opened this issue Jul 11, 2019 · 5 comments
Open

TypeError: item.destroy is not a function #380

citricacid-pl opened this issue Jul 11, 2019 · 5 comments

Comments

@citricacid-pl
Copy link

Hi, I am using vue-lazyload version: 1.3.1 and vue version: 2.6.10.

I am receiving TypeError while using <lazy-component>:

Uncaught TypeError: item.destroy is not a function
    at eval (vue-lazyload.esm.js?0177:1349)
    at Array.forEach (<anonymous>)
    at Lazy._lazyLoadHandler (vue-lazyload.esm.js?0177:1347)
    at runCallback (vue-lazyload.esm.js?0177:484)

Zrzut ekranu 2019-07-11 o 10 35 49

@coleShang
Copy link

me too

@stefanfisk
Copy link

stefanfisk commented Jul 23, 2019

A quick and DIRTY workaround is to do this before loading the plugin:

Vue.use({
  install() {
    Vue.prototype.destroy = Vue.prototype.$destroy;
  },
});

@citricacid-pl
Copy link
Author

@stefanfisk Yes. Seems dirty. There is another solution proposed in #381 (similar to yours but not that hacky)

@AmeerTaweel
Copy link

A quick and DIRTY workaround is to do this before loading the plugin:

Vue.use({
  install() {
    Vue.prototype.destroy = Vue.prototype.$destroy;
  },
});

Thanks. This worked for me.

@JensvdHeydt
Copy link

@hilongjw The fix to this problem is already merged into master. Could you please make a new release, so that all these issues can get resolved?

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

5 participants