Do not check types when merging configuration

This commit is contained in:
Vjacheslav Trushkin 2020-07-22 20:54:14 +03:00
parent 9ca392c50c
commit b6bdcb142b
1 changed files with 4 additions and 5 deletions

9
app.js
View File

@ -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 {