From db59284b6fe50bc04d36b189fc2d5e2a86660431 Mon Sep 17 00:00:00 2001 From: legonzaur Date: Fri, 5 May 2023 13:47:01 +0200 Subject: [PATCH] fix weapons not being sorted --- src/components/WeaponChart.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/WeaponChart.vue b/src/components/WeaponChart.vue index 4751f1e..4a57e9c 100644 --- a/src/components/WeaponChart.vue +++ b/src/components/WeaponChart.vue @@ -146,9 +146,8 @@ export default defineComponent({ }, sortedWeaponList (): string[] { if (!this.weapons) return [] - const date = new Date() - const weapons = Object.keys(this.weapons) - weapons.filter(e => this.weapons[e].value.kills > 0).sort((a, b) => { + const weapons = Object.keys(this.weapons).filter(e => this.weapons[e].value.kills > 0) + weapons.sort((a, b) => { if (Number(this.weapons[a].value.kills) < Number(this.weapons[b].value.kills)) { return -1 } @@ -157,7 +156,6 @@ export default defineComponent({ } return 0 }) - console.log('sorting the weapon list took ' + (new Date().getTime() - date.getTime()) + 'ms') return weapons } }