From c2f2d72901ec18a01368e0d3accf89b88138386a Mon Sep 17 00:00:00 2001 From: HardiReady Date: Wed, 27 Dec 2017 20:34:16 +0100 Subject: [PATCH] optimize highscore filter --- static/src/app/statistic/highscore/highscore.component.html | 6 ------ static/src/app/statistic/highscore/highscore.component.ts | 2 +- static/src/app/statistic/war-list/war-list.component.html | 4 ---- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/static/src/app/statistic/highscore/highscore.component.html b/static/src/app/statistic/highscore/highscore.component.html index 040e549..1e4297d 100644 --- a/static/src/app/statistic/highscore/highscore.component.html +++ b/static/src/app/statistic/highscore/highscore.component.html @@ -17,7 +17,6 @@ { for (let i = 0; i < query.length; i++) { - if (player.name.toLowerCase().includes(query[i].trim())) { + if (query[i].trim() != '' && player.name.toLowerCase().includes(query[i].trim())) { return true; } } diff --git a/static/src/app/statistic/war-list/war-list.component.html b/static/src/app/statistic/war-list/war-list.component.html index c37affa..721ef16 100644 --- a/static/src/app/statistic/war-list/war-list.component.html +++ b/static/src/app/statistic/war-list/war-list.component.html @@ -23,22 +23,18 @@
-
-
-- 2.25.1