If you open the Light box by clicking on the first video thumbnail in this album with this code, you get a crash:
VM8 index.htm:683 Uncaught (in promise) TypeError: Cannot read property 'dataset' of undefined
at PhotoSwipeDynamicCaption.captionContent (VM8 index.htm:683)
at PhotoSwipeDynamicCaption.getCaptionHTML (photoswipe-dynamic-caption-plugin.esm.js:331)
at PhotoSwipeDynamicCaption.updateCaptionHTML (photoswipe-dynamic-caption-plugin.esm.js:353)
at PhotoSwipe. (photoswipe-dynamic-caption-plugin.esm.js:60)
at photoswipe.esm.js:3703
at Array.forEach ()
at PhotoSwipe.dispatch (photoswipe.esm.js:3702)
at PhotoSwipe.init (photoswipe.esm.js:4345)
at PhotoSwipeLightbox._openPhotoswipe (photoswipe-lightbox.esm.js:633)
at photoswipe-lightbox.esm.js:590
I use both images and videos:
And use the dynamic-caption-plugin:
If you open the Light box by clicking on the first video thumbnail in this album with this code, you get a crash:
VM8 index.htm:683 Uncaught (in promise) TypeError: Cannot read property 'dataset' of undefined at PhotoSwipeDynamicCaption.captionContent (VM8 index.htm:683) at PhotoSwipeDynamicCaption.getCaptionHTML (photoswipe-dynamic-caption-plugin.esm.js:331) at PhotoSwipeDynamicCaption.updateCaptionHTML (photoswipe-dynamic-caption-plugin.esm.js:353) at PhotoSwipe. (photoswipe-dynamic-caption-plugin.esm.js:60)
at photoswipe.esm.js:3703
at Array.forEach ()
at PhotoSwipe.dispatch (photoswipe.esm.js:3702)
at PhotoSwipe.init (photoswipe.esm.js:4345)
at PhotoSwipeLightbox._openPhotoswipe (photoswipe-lightbox.esm.js:633)
at photoswipe-lightbox.esm.js:590
To prevent this, I use this code:
What is the best value to return in the catch(err) code? Any chance this will be resolved, so that I can add captions to video's?