Skip to content

Commit

Permalink
Sort default dashboard area cards by alphabetical order if no order s…
Browse files Browse the repository at this point in the history
…pecified (#18989)
  • Loading branch information
karwosts authored Dec 12, 2023
1 parent 12e6701 commit ad556a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/data/area_registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const areaCompare =
(entries?: HomeAssistant["areas"], order?: string[]) =>
(a: string, b: string) => {
const indexA = order ? order.indexOf(a) : -1;
const indexB = order ? order.indexOf(b) : 1;
const indexB = order ? order.indexOf(b) : -1;
if (indexA === -1 && indexB === -1) {
const nameA = entries?.[a]?.name ?? a;
const nameB = entries?.[b]?.name ?? b;
Expand Down

0 comments on commit ad556a4

Please sign in to comment.