diff --git a/tools/isobuild/npm-discards.ts b/tools/isobuild/npm-discards.ts index 59f69c943c..33b950a573 100644 --- a/tools/isobuild/npm-discards.ts +++ b/tools/isobuild/npm-discards.ts @@ -68,7 +68,7 @@ function merge(into: Discards, from: Discards): void { intoValue.push.apply(intoValue, fromValue); } else { // Make a defensive copy of any arrays passed to `Npm.strip`. - into[packageName] = fromValue.slice(0); + into[packageName] = Array.from(fromValue); } } });