fix: add optional chaining to prevent errors when checking PIP mode or fullscreen status

This commit is contained in:
mr. M
2025-04-02 14:32:25 +02:00
parent 2a5c5e5d69
commit 2bb183d675

View File

@@ -148,7 +148,7 @@ class ZenMediaController {
} }
showMediaControls() { showMediaControls() {
if (this._currentMediaController.isBeingUsedInPIPModeOrFullscreen) return this.hideMediaControls(); if (this._currentMediaController?.isBeingUsedInPIPModeOrFullscreen) return this.hideMediaControls();
if (!this.mediaControlBar.hasAttribute('hidden')) return; if (!this.mediaControlBar.hasAttribute('hidden')) return;
this.updatePipButton(); this.updatePipButton();