generated from Seekra/repository-template
Add settings validator unit test #113
@@ -69,7 +69,7 @@ export const validateEntry = function validateEntry (entry, path) {
|
||||
}
|
||||
if (entry.type === 'selection') {
|
||||
validateSelectionOptions(entry.options, path);
|
||||
if (typeof entry.allowMultiple !== 'boolean') {
|
||||
if (typeof entry.allowMultiple !== 'boolean' && entry.allowMultiple) {
|
||||
throw new Error(`[settings] "${path}.allowMultiple" must be a boolean`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user