gallery: use Set on displaytypes instead
This commit is contained in:
parent
0c3d81d0a0
commit
68eab91db8
1 changed files with 2 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ import Attachment from '../attachment/attachment.vue'
|
||||||
|
|
||||||
import { useMediaViewerStore } from 'src/stores/media_viewer.js'
|
import { useMediaViewerStore } from 'src/stores/media_viewer.js'
|
||||||
|
|
||||||
const displayTypes = ["image", "video", "flash"]
|
const displayTypes = new Set(["image", "video", "flash"])
|
||||||
|
|
||||||
const Gallery = {
|
const Gallery = {
|
||||||
props: [
|
props: [
|
||||||
|
|
@ -54,7 +54,7 @@ const Gallery = {
|
||||||
{ items: [] },
|
{ items: [] },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
if (!displayTypes.includes(attachment.type)) {
|
if (!displayTypes.has(attachment.type)) {
|
||||||
return [
|
return [
|
||||||
...acc,
|
...acc,
|
||||||
{ minimal: true, items: [attachment] },
|
{ minimal: true, items: [attachment] },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue