mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 05:47:20 +00:00
Prevent index access errors in entity quick bar (#9964)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
bc09febd2c
commit
2bd9b5a015
@ -299,6 +299,10 @@ export class QuickBar extends LitElement {
|
||||
|
||||
private _handleSelected(ev: SingleSelectedEvent) {
|
||||
const index = ev.detail.index;
|
||||
if (index < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const item = ((ev.target as List).items[index] as any).item;
|
||||
this.processItemAndCloseDialog(item, index);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user