Fix entity picker delete entity (#20542)

This commit is contained in:
karwosts 2024-04-17 10:48:25 -07:00 committed by GitHub
parent fbef0b0186
commit af37d57779
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -409,7 +409,7 @@ export class HaEntityPicker extends LitElement {
ev.stopPropagation();
const newValue = ev.detail.value;
if (newValue.startsWith(CREATE_ID)) {
if (newValue && newValue.startsWith(CREATE_ID)) {
const domain = newValue.substring(CREATE_ID.length);
showHelperDetailDialog(this, {
domain,