From 05f3ed401f2f6102b4a8eab12e53c4b0d2ecd8c8 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 9 Jan 2022 16:57:01 -0500 Subject: fix config error --- src/commands/config/config.ts | 8 ++++++-- 1 file 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 - ? (feat).map(func).join('\n') + ? ((feat)).map(func).join('\n') : '[Empty Array]' : feat !== null ? func(feat) -- cgit