From 5f07e66915811ada883202a9ae45bcfe1bf103a6 Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Thu, 4 Jun 2026 15:17:32 +0200 Subject: [PATCH] fix(settings): check the selection options and allowMultiple after and not in the default check in the settings validator --- src/features/settings/utils/settingsValidator.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/features/settings/utils/settingsValidator.js b/src/features/settings/utils/settingsValidator.js index b792c61..e90558d 100644 --- a/src/features/settings/utils/settingsValidator.js +++ b/src/features/settings/utils/settingsValidator.js @@ -66,12 +66,12 @@ export const validateEntry = function validateEntry (entry, path) { 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) { - throw new Error(`[settings] "${path}.allowMultiple" must be a boolean`); - } - } + } + if (entry.type === 'selection') { + validateSelectionOptions(entry.options, path); + if (typeof entry.allowMultiple !== 'boolean' && entry.allowMultiple) { + throw new Error(`[settings] "${path}.allowMultiple" must be a boolean`); + } } }