Skip to content

Commit

Permalink
Introduce checks for preventing preview loading
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Mar 2, 2021
1 parent 58ce5c4 commit 313b98c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/web-app-files/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,10 @@ export default {
}

for (const resource of resources) {
if (!resource.extension) {
continue
}

const etag = resource.etag

if (etag) {
Expand All @@ -532,13 +536,10 @@ export default {

try {
resource.preview = await mediaSource(previewUrl, 'url')
commit('UPDATE_RESOURCE', resource)
} catch (error) {
console.error(error)
}
}

for (const resource of resources) {
commit('UPDATE_RESOURCE', resource)
}
}
}

0 comments on commit 313b98c

Please sign in to comment.