fixed cors problem when fetching posters

This commit is contained in:
Daniel Shleifman
2021-07-05 22:30:20 +03:00
parent 27dd014122
commit 7440e2ebd1

View File

@@ -24,7 +24,7 @@ export const checkImageURL = async url => {
if (!url || !url.match(/.(jpg|jpeg|png|gif)$/i)) return false
try {
await fetch(url)
await fetch(url, { mode: 'no-cors' })
return true
} catch (e) {
return false