From 4d25be7cb35f86ba2abe883116dc6442c93a1d9d Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson <shp@cock.li>
Date: Mon, 6 Jul 2020 13:42:33 +0300
Subject: [PATCH] fix modal types check being broken

---
 src/components/attachment/attachment.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js
index 561a5a98..fe28e5f3 100644
--- a/src/components/attachment/attachment.js
+++ b/src/components/attachment/attachment.js
@@ -63,10 +63,11 @@ const Attachment = {
       return this.type === 'html' || this.type === 'audio'
     },
     useModal () {
-      return this.size === 'hide' ? ['image', 'video', 'audio']
+      const modalTypes = this.size === 'hide' ? ['image', 'video', 'audio']
         : this.mergedConfig.playVideosInModal
           ? ['image', 'video']
           : ['image']
+      return modalTypes.includes(this.type)
     },
     ...mapGetters(['mergedConfig'])
   },