Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(imageview): Don't try to load unresolved images
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed Apr 11, 2024
commit 6f2fa1e2abbc2596ec47b5a8156905914179e9a8
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