From 8850732ec6b9a270bd0ae5d6cb7f714c90c689d5 Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Thu, 4 Jun 2026 15:18:11 +0200 Subject: [PATCH] fix(settings): fix indentation in validateEntry in the settings validator --- src/features/settings/utils/settingsValidator.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/features/settings/utils/settingsValidator.js b/src/features/settings/utils/settingsValidator.js index e90558d..1f670a7 100644 --- a/src/features/settings/utils/settingsValidator.js +++ b/src/features/settings/utils/settingsValidator.js @@ -58,15 +58,15 @@ export const validateEntry = function validateEntry (entry, path) { if (entry.default !== undefined) { if (entry.type === 'bool' && typeof entry.default !== 'boolean') { - throw new Error(`[settings] "${path}.default" must be a boolean`); - } - if (entry.type === 'number' && typeof entry.default !== 'number') { - throw new Error(`[settings] "${path}.default" must be a number`); - } - if (entry.type === 'string' && typeof entry.default !== 'string') { - throw new Error(`[settings] "${path}.default" must be a string`); - } + throw new Error(`[settings] "${path}.default" must be a boolean`); } + if (entry.type === 'number' && typeof entry.default !== 'number') { + throw new Error(`[settings] "${path}.default" must be a number`); + } + if (entry.type === 'string' && typeof entry.default !== 'string') { + throw new Error(`[settings] "${path}.default" must be a string`); + } + } if (entry.type === 'selection') { validateSelectionOptions(entry.options, path); if (typeof entry.allowMultiple !== 'boolean' && entry.allowMultiple) {