From 5c23842a02e5320381ecf109d5da621d6bb9f89f Mon Sep 17 00:00:00 2001 From: MrBearPresident <70381149+MrBearPresident@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:30:15 +0100 Subject: [PATCH] Add check if sub-button-container exist and then set opacity --- src/cards/media-player/changes.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cards/media-player/changes.ts b/src/cards/media-player/changes.ts index f9e0683f..55c78156 100644 --- a/src/cards/media-player/changes.ts +++ b/src/cards/media-player/changes.ts @@ -168,7 +168,7 @@ export function changeVolumeIcon(context) { context.elements.volumeButton.setAttribute("icon", newIcon); context.elements.mediaInfoContainer.style.opacity = newOpacity; context.elements.nameContainer.style.opacity = newOpacity; - context.elements.subButtonContainer.style.opacity = newOpacity; + if(context.elements.subButtonContainer)context.elements.subButtonContainer.style.opacity = newOpacity; context.elements.previousButton.style.opacity = newOpacity; context.elements.nextButton.style.opacity = newOpacity; context.elements.powerButton.style.opacity = newOpacity; @@ -242,4 +242,4 @@ export function changeStyle(context) { if (context.elements.customStyle) { context.elements.customStyle.innerText = customStyle; } -} \ No newline at end of file +}