From fd77e3ddf56546a6bf88f58d244dcd400a53fab7 Mon Sep 17 00:00:00 2001 From: ludeeus Date: Sun, 9 Feb 2020 10:44:39 +0000 Subject: [PATCH] Fixes #65 --- src/panels/store.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/panels/store.ts b/src/panels/store.ts index 7de77bce..08bd540e 100644 --- a/src/panels/store.ts +++ b/src/panels/store.ts @@ -43,14 +43,18 @@ export class HacsStore extends LitElement { return Date.parse(a.last_updated) < Date.parse(b.last_updated); } - return a[sortkey] > b[sortkey]; + return ( + String(a[sortkey]).toLowerCase() > String(b[sortkey]).toLowerCase() + ); } else { if (sortkey === "stars") return a.stars > b.stars; if (sortkey === "last_updated") { return Date.parse(a.last_updated) > Date.parse(b.last_updated); } - return a[sortkey] < b[sortkey]; + return ( + String(a[sortkey]).toLowerCase() < String(b[sortkey]).toLowerCase() + ); } }