refactor: 🔨 use rest spread replace prototype.push.apply

This commit is contained in:
Meeeeow 2017-12-04 00:39:13 +08:00 committed by juanpicado
parent 6732d2bdcd
commit 6a2bcd529a
1 changed files with 1 additions and 2 deletions

View File

@ -379,8 +379,7 @@ class Storage {
return options.callback(err);
}
const propertyToKeep = [];
Array.prototype.push.apply(propertyToKeep, WHITELIST);
const propertyToKeep = [...WHITELIST];
if (options.keepUpLinkData === true) {
propertyToKeep.push('_uplinks');
}