Skip to content

Commit

Permalink
Check for hui-root
Browse files Browse the repository at this point in the history
  • Loading branch information
j-a-n committed Jul 19, 2024
1 parent 7c6df58 commit dacfb81
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions wallpanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class ScreenWakeLock {
}
}

const version = "4.25.4";
const version = "4.25.5";
const defaultConfig = {
enabled: false,
enabled_on_tabs: [],
Expand Down Expand Up @@ -496,15 +496,16 @@ function setSidebarHidden(hidden) {
if (!panelLovelace) {
return;
}
const menuButton = panelLovelace.shadowRoot
.querySelector("hui-root").shadowRoot
.querySelector("ha-menu-button");
if (menuButton) {
if (hidden) {
menuButton.style.display = "none";
}
else {
menuButton.style.removeProperty("display");
const huiRoot = panelLovelace.shadowRoot.querySelector("hui-root");
if (huiRoot) {
const menuButton = huiRoot.shadowRoot.querySelector("ha-menu-button");
if (menuButton) {
if (hidden) {
menuButton.style.display = "none";
}
else {
menuButton.style.removeProperty("display");
}
}
}
}
Expand Down

0 comments on commit dacfb81

Please sign in to comment.