aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-09 16:57:01 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-09 16:57:01 -0500
commit05f3ed401f2f6102b4a8eab12e53c4b0d2ecd8c8 (patch)
treeab94df4cf65ea8f0bdc4237a131444a51dc93d8d
parentef9a294f9e0144f21b6e23f177eb301bc0b15f8e (diff)
downloadtanzanite-05f3ed401f2f6102b4a8eab12e53c4b0d2ecd8c8.tar.gz
tanzanite-05f3ed401f2f6102b4a8eab12e53c4b0d2ecd8c8.tar.bz2
tanzanite-05f3ed401f2f6102b4a8eab12e53c4b0d2ecd8c8.zip
fix config error
-rw-r--r--src/commands/config/config.ts8
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)