From b6bdcb142b00f934221bc85aa890f42dcb6ff984 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 22 Jul 2020 20:54:14 +0300 Subject: [PATCH] Do not check types when merging configuration --- app.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 8827f57..5ab7afe 100644 --- a/app.js +++ b/app.js @@ -37,11 +37,10 @@ try { try { customConfig = JSON.parse(customConfig); Object.keys(customConfig).forEach((key) => { - if (typeof app.config[key] !== typeof customConfig[key]) { - return; - } - - if (typeof app.config[key] === 'object') { + if ( + typeof app.config[key] === 'object' && + typeof customConfig[key] === 'object' + ) { // merge object Object.assign(app.config[key], customConfig[key]); } else {