fix modal types check being broken

This commit is contained in:
Shpuld Shpuldson 2020-07-06 13:42:33 +03:00
parent 150516df4e
commit 4d25be7cb3

View File

@ -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'])
},