From 5c0ab467242d1de5d62bd3cdb812518e4b037c0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=E1=BA=A1m=20Ng=E1=BB=8Dc=20Quang=20Nam?= Date: Thu, 4 Aug 2022 15:23:46 +0200 Subject: [PATCH] fix: double totalWeight We call `totalWeight += obj.weight` two times, so the `totalWeight` is double --- src/tools/KeyStore.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/tools/KeyStore.js b/src/tools/KeyStore.js index da1d3efe5..924d6cf40 100644 --- a/src/tools/KeyStore.js +++ b/src/tools/KeyStore.js @@ -13,8 +13,6 @@ export default class KeyStore { keys.forEach((key) => { let obj = createKey(key) - totalWeight += obj.weight - this._keys.push(obj) this._keyMap[obj.id] = obj