Readability improvement when copying array

This commit is contained in:
James Miller Burgess
2019-08-05 04:33:25 +09:00
parent bc1ce63b96
commit 30867aa577

View File

@@ -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);
}
}
});