Skip to content

Commit

Permalink
Fixes #65
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Feb 9, 2020
1 parent 429652c commit fd77e3d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/panels/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}
}

Expand Down

0 comments on commit fd77e3d

Please sign in to comment.