From a3f74b6d6b59e2621f9ce91dcdd76a14aac29f1b Mon Sep 17 00:00:00 2001 From: Young Shung Date: Sun, 7 Apr 2024 20:01:41 +0800 Subject: [PATCH] null check before set volume slider attr --- src/lib/VolumeSlider.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/VolumeSlider.ts b/src/lib/VolumeSlider.ts index 91656d8..a281972 100644 --- a/src/lib/VolumeSlider.ts +++ b/src/lib/VolumeSlider.ts @@ -65,6 +65,7 @@ export function setVolumeSlider( if (id === null) return; // throw new Error("ID not found"); const volumeContainer = getVolumeContainer(); + if (!volumeContainer) return; volumeContainer.setAttribute(INJECTION_MARKER, ""); // ? for injections // const slider = document.createElement("input") const slider = render(`