Guard against missing meta section

This commit is contained in:
Pleromian 2025-04-13 21:26:14 +02:00
commit 7981473b23

View file

@ -88,12 +88,14 @@ export default {
}, },
currentTheme () { currentTheme () {
if (useInterfaceStore().styleDataUsed) { if (useInterfaceStore().styleDataUsed) {
const themeName = useInterfaceStore().styleDataUsed.find(x => x.component === '@meta').directives.name const styleMeta = useInterfaceStore().styleDataUsed.find(x => x.component === '@meta')
return themeName.replaceAll(" ", "-").toLowerCase() if (styleMeta !== undefined) {
} else { return styleMeta.directives.name.replaceAll(" ", "-").toLowerCase()
return 'stock' }
} }
return 'stock'
}, },
layoutModalClass () { layoutModalClass () {
return '-' + this.layoutType return '-' + this.layoutType