diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-09 16:57:01 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-09 16:57:01 -0500 |
commit | 05f3ed401f2f6102b4a8eab12e53c4b0d2ecd8c8 (patch) | |
tree | ab94df4cf65ea8f0bdc4237a131444a51dc93d8d /src/commands/config/config.ts | |
parent | ef9a294f9e0144f21b6e23f177eb301bc0b15f8e (diff) | |
download | tanzanite-05f3ed401f2f6102b4a8eab12e53c4b0d2ecd8c8.tar.gz tanzanite-05f3ed401f2f6102b4a8eab12e53c4b0d2ecd8c8.tar.bz2 tanzanite-05f3ed401f2f6102b4a8eab12e53c4b0d2ecd8c8.zip |
fix config error
Diffstat (limited to 'src/commands/config/config.ts')
-rw-r--r-- | src/commands/config/config.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index b7b3f0e..6e08cc3 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -320,11 +320,15 @@ export default class ConfigCommand extends BushCommand { } } - assert(typeof feat === 'string' || Array.isArray(feat), `feat is not a string: ${util.inspect(feat)}`); + assert( + feat === null || typeof feat === 'string' || Array.isArray(feat), + `feat is not a string or an array: ${util.inspect(feat)}` + ); + assert(type !== 'custom'); return Array.isArray(feat) ? feat.length - ? (<string[]>feat).map(func).join('\n') + ? (<string[]>(<unknown[]>feat)).map(func).join('\n') : '[Empty Array]' : feat !== null ? func(feat) |