diff --git a/assets/reader/js/index.js b/assets/reader/js/index.js index 75c2e506..3cd62d3c 100644 --- a/assets/reader/js/index.js +++ b/assets/reader/js/index.js @@ -423,6 +423,7 @@ const TTSController = () => { return; } stopEvent(e); + controllerElement ??= document.getElementById('TTS-Controller'); const touch = e.changedTouches[0]; const bounds = controllerElement.getBoundingClientRect(); dragOffsetX = touch.clientX - bounds.left;