From fd01302d9abd17fd7b70aaea256724681ef8dfd0 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Sat, 26 Oct 2024 13:17:20 -0700 Subject: [PATCH] Fix a crash in compute-unused-entities (#22549) --- src/panels/lovelace/common/compute-unused-entities.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panels/lovelace/common/compute-unused-entities.ts b/src/panels/lovelace/common/compute-unused-entities.ts index dd2fafe89108..ff563456e0d2 100755 --- a/src/panels/lovelace/common/compute-unused-entities.ts +++ b/src/panels/lovelace/common/compute-unused-entities.ts @@ -26,6 +26,9 @@ const addFromAction = (entities: Set, actionConfig: ActionConfig) => { }; const addEntityId = (entities: Set, entity) => { + if (!entity) { + return; + } if (typeof entity === "string") { entities.add(entity); return;