Fixed renames and breadcrumbs for gallery.

This commit is contained in:
Leo Vasanko
2023-11-20 13:47:41 -08:00
parent 7cc7e32c33
commit b2a24fca57
7 changed files with 39 additions and 18 deletions

View File

@@ -1,5 +1,8 @@
import { useMainStore } from '@/stores/main'
const store = useMainStore()
export const exists = (path: string[]) => store.document.some(doc => (doc.loc ? `${doc.loc}/${doc.name}` : doc.name) === path.join('/'))
export const exists = (path: string[]) => {
const store = useMainStore()
const p = path.join('/')
return store.document.some(doc => (doc.loc ? `${doc.loc}/${doc.name}` : doc.name) === p)
}