fix(settings): fix handling of non-existent paths

Previously, the settings view now does not check whether the settings
content is falsy. But, if the setting does not exist, the setting itself
is undefined. So, if the specified settings path did not exist, an
error was thrown.
Now, the setting is checked for being falsy, not the setting content.
This commit is contained in:
jakob.scheid authored and jakob.scheid committed 2026-07-28 20:10:17 +02:00
1 parent b062015f23
commit 167ddbfb4e
1 file changed
+1 -1
+1 -1
View File
@@ -44,7 +44,7 @@ watchEffect(() => {
const updateSettings = function updateSettings () { const updateSettings = function updateSettings () {
if (activeSection.value) { if (activeSection.value) {
const setting = getSettingRecursively(activeSection.value, settings.value); const setting = getSettingRecursively(activeSection.value, settings.value);
if (!setting.content) { if (!setting) {
router.push('/settings'); router.push('/settings');
} else { } else {
activeSectionContent.value = setting; activeSectionContent.value = setting;