Skip to content
Snippets Groups Projects
Verified Commit 69718fe7 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: reset config #136

parent d94697cf
No related branches found
No related tags found
No related merge requests found
...@@ -14,8 +14,6 @@ export { extend }; ...@@ -14,8 +14,6 @@ export { extend };
* Extend copies all enumerable own properties from one or * Extend copies all enumerable own properties from one or
* more source objects to a target object. It returns the modified target object. * more source objects to a target object. It returns the modified target object.
* *
* @param {object} target
* @param {object}
* @return {object} * @return {object}
* @license AGPLv3 * @license AGPLv3
* @since 1.10.0 * @since 1.10.0
...@@ -24,6 +22,7 @@ export { extend }; ...@@ -24,6 +22,7 @@ export { extend };
* @throws {Error} unsupported argument * @throws {Error} unsupported argument
* @throws {Error} type mismatch * @throws {Error} type mismatch
* @throws {Error} unsupported argument * @throws {Error} unsupported argument
* @param args
*/ */
function extend(...args) { function extend(...args) {
let o; let o;
...@@ -69,8 +68,18 @@ function extend(...args) { ...@@ -69,8 +68,18 @@ function extend(...args) {
} }
} }
if (isArray(o[k])) {
o[k] = [];
o[k].push(...v);
continue;
}
o[k] = extend(o[k], v); o[k] = extend(o[k], v);
} else { } else {
if (isArray(o)) {
o.push(v);
continue;
}
o[k] = v; o[k] = v;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment