Cannot read property 'style' of undefined
pfranck opened this issue · 2 comments
I am using the js-cloudimage-responsive plugin in a Nuxt.js project. It has been working flawlessy until I wanted to add an image in there without using the cloud image plugin. I tried to get in the version without css, however the documentation that is provided leaves me with the error that the correct package is not installed. The error I'm getting is the following:
Uncaught TypeError: Cannot read property 'style' of undefined
at CIResponsive.onPreviewWithRatioImageLoad (ci.service.js?c31a:457)
It only occurs once a background image is loaded that is not using the plugin
hey @pfranck ,
The JS version of the plugin is manipulating DOM in real-time. The team is not very familiar with how Vue.js can handle these problems. As far as I know, Vue.js has lots of escape hatches available to allow for non-Vue JavaScript that also touches the DOM. You would help us by creating a demo project or codesandbox example to show the problem and so that we can adapt our JS plugins for it.
Hi,
We are having the same issue on some images. We use the plugin on a lot of places but simetimes we see this error in the console. When looking which line causes this it is:
b.style.background = "transparent",
Effect is that the blurred loader image is not removed and keeps showing behind the "normal" image. Weird thing is that it is reproducable but not always.
We are using V6 of the plugin btw.
Any ideas?
Regards