Skip to content

Commit b54ecf0

Browse files
committed
Fix Expose page crash when filtered by assistant
The assistants URL filter can skip creating a row for entities that are only exposed via Cloud (Alexa/Google) manual config, but the sortable key was still assigned to the missing row, throwing a TypeError and leaving the page on an infinite spinner. Only assign the key when the row exists. Fixes #53689
1 parent a406abf commit b54ecf0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/panels/config/voice-assistants/ha-config-voice-assistants-expose.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,11 @@ export class VoiceAssistantsExpose extends LitElement {
395395
aliases: entry?.aliases || [],
396396
};
397397
}
398-
result[entityId].assistants_sortable_key = getAssistantsSortableKey(
399-
result[entityId].assistants
400-
);
398+
if (result[entityId]) {
399+
result[entityId].assistants_sortable_key = getAssistantsSortableKey(
400+
result[entityId].assistants
401+
);
402+
}
401403
});
402404
}
403405
return Object.values(result);

0 commit comments

Comments
 (0)