Merge pull request #365 from choplin/patch-1

Avoid `invalidConfigPath` for function values
master
Brad Cornes 2021-07-07 12:36:56 +01:00 committed by GitHub
commit b09d4849a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -90,10 +90,11 @@ function validateConfigPath(
typeof value === 'number' || typeof value === 'number' ||
value instanceof String || value instanceof String ||
value instanceof Number || value instanceof Number ||
Array.isArray(value) Array.isArray(value) ||
typeof value === 'function'
) )
) { ) {
let reason = `'${pathToString(path)}' was found but does not resolve to a string.` let reason = `'${pathToString(path)}' was found but does not resolve to a string, number, array or function.`
if (isObject(value)) { if (isObject(value)) {
let validKeys = Object.keys(value).filter( let validKeys = Object.keys(value).filter(