From 7981473b23466c8dbd97b02f7932eb4ee3773748 Mon Sep 17 00:00:00 2001 From: Pleromian <66706-pleromian@users.noreply.git.pleroma.social> Date: Sun, 13 Apr 2025 21:26:14 +0200 Subject: [PATCH] Guard against missing meta section --- src/App.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/App.js b/src/App.js index 611a40cf7..013ea323c 100644 --- a/src/App.js +++ b/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