HOTFIX - catch ipfs errors grabbing media

This commit is contained in:
Barry Gitarts 2020-01-14 08:13:51 -05:00
parent 5a72c8184b
commit 64a2894daf
1 changed files with 7 additions and 3 deletions

View File

@ -46,9 +46,13 @@ export const getMediaSrc = assets => {
if (validMedia) {
if (media.url) return media.url
if (media.file && media.file !== '/root/') {
return formatMedia(
assets.find(a => getName(a) === getFile(media.file)).content
)
try {
return formatMedia(
assets.find(a => getName(a) === getFile(media.file)).content
)
} catch(err) {
console.log({err})
}
}
}
}