From 30867aa5779261eefa686dbf7d8972aeec136c67 Mon Sep 17 00:00:00 2001 From: James Miller Burgess Date: Mon, 5 Aug 2019 04:33:25 +0900 Subject: [PATCH] Readability improvement when copying array --- tools/isobuild/npm-discards.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } });