From f9dd0a0cfeab3e9c9bdafc579148028650329b7d Mon Sep 17 00:00:00 2001 From: Will Hunt <will@half-shot.uk> Date: Tue, 31 Jul 2018 14:10:21 +0100 Subject: [PATCH] Fix issue where we failed to apply array config values --- src/config.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.ts b/src/config.ts index b1762f4..f8be3e4 100644 --- a/src/config.ts +++ b/src/config.ts @@ -14,10 +14,11 @@ export class DiscordBridgeConfig { */ public ApplyConfig(newConfig: {[key: string]: any}, configLayer: any = this) { Object.keys(newConfig).forEach((key) => { - if (typeof(configLayer[key]) === "object") { + if ( typeof(configLayer[key]) === "object" && + !Array.isArray(configLayer[key])) { this.ApplyConfig(newConfig[key], this[key]); return; - } + } configLayer[key] = newConfig[key]; }); } -- GitLab