diff --git a/hwe/ts/util/APIPathGen.js b/hwe/ts/util/APIPathGen.js index 0b877b40..fa4d05ed 100644 --- a/hwe/ts/util/APIPathGen.js +++ b/hwe/ts/util/APIPathGen.js @@ -12,8 +12,7 @@ export function APIPathGen(obj, callback, path) { nextPath = [key]; } else { - nextPath = path; - nextPath.push(key); + nextPath = [...path, key]; } if (!(key in target)) {