Skip to content

Commit ad556a4

Browse files
authored
Sort default dashboard area cards by alphabetical order if no order specified (#18989)
1 parent 12e6701 commit ad556a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/data/area_registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const areaCompare =
128128
(entries?: HomeAssistant["areas"], order?: string[]) =>
129129
(a: string, b: string) => {
130130
const indexA = order ? order.indexOf(a) : -1;
131-
const indexB = order ? order.indexOf(b) : 1;
131+
const indexB = order ? order.indexOf(b) : -1;
132132
if (indexA === -1 && indexB === -1) {
133133
const nameA = entries?.[a]?.name ?? a;
134134
const nameB = entries?.[b]?.name ?? b;

0 commit comments

Comments
 (0)