silencesys / silentbox

A lightbox inspired Vue.js component.
https://silentbox.rocek.dev
MIT License
296 stars 50 forks source link

JSON.parse error when Vimeo request for thumbnail fails #58

Closed mauricoder closed 1 year ago

mauricoder commented 3 years ago

When a request to Vimeo API for a thumbnail fails (ie a 404) the component doesn't handle the error, and it tries to parse the response anyways.

image

Then there is a JSON.parse error

Still havent tried it in production, but in development that means that the whole page breaks.

There's a small fix to be done in item.js mixin when doing the XMLHttpRequest to handle this

I will gladly submit a PR for this if it's welcomed.

silencesys commented 1 year ago

Should be fixed in version 3 :)