Skip to content

Commit 3027760

Browse files
Merge pull request #5656 from nextcloud/backport/5655/stable29
[stable29] fix(imageview): Don't try to load unresolved images
2 parents 59bde18 + 6f2fa1e commit 3027760

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/nodes/ImageView.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ export default {
243243
methods: {
244244
async loadPreview() {
245245
this.attachment = await this.$attachmentResolver.resolve(this.src)
246+
if (!this.attachment.previewUrl) {
247+
throw new Error('Attachment source was not resolved')
248+
}
246249
return new Promise((resolve, reject) => {
247250
const img = new Image()
248251
img.onload = async () => {

0 commit comments

Comments
 (0)