You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was building a filter mechanism for videos with their respective thumbnails.
When the user switches the filters quickly, it can happen that images start loading but then with the next filter trigger, the images no longer appear.
However, in the Background, NuxtImg is still trying to load the image file and then replace the img.src.
This fails with the following error since the img tag is no longer in the dom.
Uncaught TypeError: Cannot set properties of null (setting 'src')
at img.onload (nuxt-img.mjs?v=028fb104:82:1)
I think a quick fix would be to check inside the on('load',… if the img tag is still present and then only replace if it is.
I could do a Pull request on this if it's something you're open to.
Thanks 🌸
Chris
The text was updated successfully, but these errors were encountered:
I was building a filter mechanism for videos with their respective thumbnails.
When the user switches the filters quickly, it can happen that images start loading but then with the next filter trigger, the images no longer appear.
However, in the Background, NuxtImg is still trying to load the image file and then replace the
img.src
.This fails with the following error since the
img
tag is no longer in the dom.I think a quick fix would be to check inside the
on('load',…
if theimg
tag is still present and then only replace if it is.I could do a Pull request on this if it's something you're open to.
Thanks 🌸
Chris
The text was updated successfully, but these errors were encountered: