Skip to content

Commit 99e7a7a

Browse files
committed
fix(imageview): Don't try to load unresolved images
Signed-off-by: Joas Schilling <[email protected]>
1 parent 4fe2fad commit 99e7a7a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/nodes/ImageView.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@ export default {
243243
methods: {
244244
async loadPreview() {
245245
this.attachment = await this.$attachmentResolver.resolve(this.src)
246+
if (!this.attachment.previewUrl) {
247+
this.loaded = true
248+
this.failed = true
249+
return
250+
}
246251
return new Promise((resolve, reject) => {
247252
const img = new Image()
248253
img.onload = async () => {

0 commit comments

Comments
 (0)