generated from Seekra/repository-template
fix(settings): check the selection options and allowMultiple after and not in the default check in the settings validator
This commit is contained in:
@@ -66,6 +66,7 @@ export const validateEntry = function validateEntry (entry, path) {
|
|||||||
if (entry.type === 'string' && typeof entry.default !== 'string') {
|
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 string`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (entry.type === 'selection') {
|
if (entry.type === 'selection') {
|
||||||
validateSelectionOptions(entry.options, path);
|
validateSelectionOptions(entry.options, path);
|
||||||
if (typeof entry.allowMultiple !== 'boolean' && entry.allowMultiple) {
|
if (typeof entry.allowMultiple !== 'boolean' && entry.allowMultiple) {
|
||||||
@@ -73,7 +74,6 @@ export const validateEntry = function validateEntry (entry, path) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates a raw settings config object.
|
* Validates a raw settings config object.
|
||||||
|
|||||||
Reference in New Issue
Block a user