diff --git a/lib/www/client/source/src/lib/utils.js b/lib/www/client/source/src/lib/utils.js index 3b55302..415d4f2 100644 --- a/lib/www/client/source/src/lib/utils.js +++ b/lib/www/client/source/src/lib/utils.js @@ -175,11 +175,19 @@ function deepEqual (a, b) { * If a non-leaf property does not exist, this function * creates it as an empty object ({}) and keeps traversing. * + * The last member of `path` may be `null`, in which case, + * if the object pointed to by the next to last member is + * an array, an insert operation will take place. + * */ function deepSet (obj, path, value) { const key = path.shift(); if (!path.length) { - obj[key] = value; + if (key === null && Array.isArray(obj)) { + obj.push(value); + } else { + obj[key] = value; + } } else { if (!Object.hasOwn(obj, key)) { obj[key] = {};