zedjarvis / vue3-compare-image

A Simple Vue 3 component to compare two images with a slider, supports vertical and horizontal modes, and Keyboard for accessibility.
https://vue3-compare-image.vercel.app
MIT License
6 stars 2 forks source link

Cannot read properties of null (reading 'naturalHeight') #2

Open sk8killer opened 4 months ago

sk8killer commented 4 months ago

The package works well except that a warning appears on Nuxt when I go back to a page where VueCompareImage tag is present... (nevertheless the VueCompareImage is still working)

sk8killer commented 4 months ago

Ok, my issue was that the plugin was client only. So embracing with ClientOnly tag corrected the problem.

<ClientOnly>
    <VueCompareImage :left-image="boldini1" :right-image="boldini2" hover slider-line-color="#ffff00" />
</ClientOnly>
zedjarvis commented 4 months ago

Thank you For the feedback, I'll note that in the docs.