From 6f2fa1e2abbc2596ec47b5a8156905914179e9a8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 11 Apr 2024 09:33:29 +0200 Subject: [PATCH] fix(imageview): Don't try to load unresolved images Signed-off-by: Joas Schilling --- src/nodes/ImageView.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue index b689cac804b..10b0710c4b5 100644 --- a/src/nodes/ImageView.vue +++ b/src/nodes/ImageView.vue @@ -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 () => {