From 6a2bcd529af221b139f996d2a00cca403dcef87e Mon Sep 17 00:00:00 2001 From: Meeeeow Date: Mon, 4 Dec 2017 00:39:13 +0800 Subject: [PATCH] refactor: :hammer: use rest spread replace prototype.push.apply --- src/lib/storage.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/storage.js b/src/lib/storage.js index b6458f10f..414126d44 100644 --- a/src/lib/storage.js +++ b/src/lib/storage.js @@ -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'); }