fix(settings): check the selection options and allowMultiple after and not in the default check in the settings validator
This commit is contained in:
1 parent
122663e2e3
commit
5f07e66915
1 file changed
+6
-6
@@ -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`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user