Skip to content

Commit

Permalink
Merge pull request #5656 from nextcloud/backport/5655/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(imageview): Don't try to load unresolved images
  • Loading branch information
nickvergessen authored Apr 11, 2024
2 parents 59bde18 + 6f2fa1e commit 3027760
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/nodes/ImageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ export default {
methods: {
async loadPreview() {
this.attachment = await this.$attachmentResolver.resolve(this.src)
if (!this.attachment.previewUrl) {
throw new Error('Attachment source was not resolved')
}
return new Promise((resolve, reject) => {
const img = new Image()
img.onload = async () => {
Expand Down

0 comments on commit 3027760

Please sign in to comment.