aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)