gallery: use Set on displaytypes instead

This commit is contained in:
Yonle 2026-02-27 22:14:01 +07:00
commit 68eab91db8
No known key found for this signature in database
GPG key ID: 11889F326F523287

View file

@ -4,7 +4,7 @@ import Attachment from '../attachment/attachment.vue'
import { useMediaViewerStore } from 'src/stores/media_viewer.js'
const displayTypes = ["image", "video", "flash"]
const displayTypes = new Set(["image", "video", "flash"])
const Gallery = {
props: [
@ -54,7 +54,7 @@ const Gallery = {
{ items: [] },
]
}
if (!displayTypes.includes(attachment.type)) {
if (!displayTypes.has(attachment.type)) {
return [
...acc,
{ minimal: true, items: [attachment] },