From 7b6aca0e5d46bd77fc114063afc71ade4d60cbd4 Mon Sep 17 00:00:00 2001 From: Villhellm Date: Wed, 9 Sep 2020 06:51:27 -0700 Subject: [PATCH] null check for title element --- dist/custom-sidebar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/custom-sidebar.js b/dist/custom-sidebar.js index eca99e7..f9ade8b 100644 --- a/dist/custom-sidebar.js +++ b/dist/custom-sidebar.js @@ -151,7 +151,7 @@ function getSidebar() { root = root && root.querySelector("app-drawer-layout app-drawer"); root = root && root.querySelector("ha-sidebar"); root = root && root.shadowRoot; - TitleElement = root.querySelector('span'); + TitleElement = root && root.querySelector('span') ? root.querySelector('span') : null ; root = root && root.querySelector("paper-listbox"); return root; }