Skip to content

Node.js based forum software built for the modern web

Fix settings trim cleaning arrays

Ole Rd3ad21f81f0f
diff --git a/src/settings.js b/src/settings.js
index 3d90dcfa84..6f3e1a0b36 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -20,6 +20,7 @@ function expandObjBy(obj1, obj2) {
}
function trim(obj1, obj2) {
+ if (obj1 instanceof Array) { return; }
var key, val1;
for (key in obj1) {
if (obj1.hasOwnProperty(key)) {
@@ -29,7 +30,7 @@ function trim(obj1, obj2) {
} else if (typeof val1 === 'object') {
trim(val1, obj2[key]);
}
- }
+ }
}
}