From 5b09a00634aa1012d814c689fbf7a16201e46d2a Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Tue, 23 Aug 2022 12:06:53 +0200 Subject: use constants for attachment types Signed-off-by: Julien Veyssier --- src/nodes/ImageView.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/nodes/ImageView.vue') diff --git a/src/nodes/ImageView.vue b/src/nodes/ImageView.vue index db5409ae5..afacbf5c2 100644 --- a/src/nodes/ImageView.vue +++ b/src/nodes/ImageView.vue @@ -167,7 +167,7 @@ export default { }, computed: { isMediaAttachment() { - return this.attachmentType !== 'image' + return this.attachmentType === this.$imageResolver.ATTACHMENT_TYPE_MEDIA }, canDisplayImage() { if (!this.isSupportedImage) { @@ -256,8 +256,7 @@ export default { this.imageLoaded = true this.loaded = true this.attachmentType = attachmentType - console.debug('SUCCESS type', attachmentType) - if (attachmentType === 'media') { + if (attachmentType === this.$imageResolver.ATTACHMENT_TYPE_MEDIA) { this.loadMediaMetadata(name) } resolve(imageUrl) @@ -270,7 +269,6 @@ export default { }, loadMediaMetadata(name) { this.$imageResolver.getMediaMetadata(name).then((response) => { - console.debug('GOTCHAAAAAA', response.data) this.attachmentMetadata = response.data }) }, -- cgit v1.2.3