Guard against missing meta section
This commit is contained in:
parent
dc65bbc051
commit
7981473b23
1 changed files with 6 additions and 4 deletions
10
src/App.js
10
src/App.js
|
|
@ -88,12 +88,14 @@ export default {
|
|||
},
|
||||
currentTheme () {
|
||||
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()
|
||||
} else {
|
||||
return 'stock'
|
||||
if (styleMeta !== undefined) {
|
||||
return styleMeta.directives.name.replaceAll(" ", "-").toLowerCase()
|
||||
}
|
||||
}
|
||||
|
||||
return 'stock'
|
||||
},
|
||||
layoutModalClass () {
|
||||
return '-' + this.layoutType
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue