From 3d3a0c43b3e4e4e851a564b9e9e4a762856ed6d6 Mon Sep 17 00:00:00 2001 From: Ivan Schurawel Date: Sun, 19 Feb 2023 15:40:36 -0500 Subject: [PATCH] chore: ensure check has valid track --- src/components/playback/playbackmanager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/playback/playbackmanager.js b/src/components/playback/playbackmanager.js index 16e617f36e..e3a73b7bf3 100644 --- a/src/components/playback/playbackmanager.js +++ b/src/components/playback/playbackmanager.js @@ -891,7 +891,7 @@ class PlaybackManager { * - or if it can be paired with a secondary subtitle when used as a primary subtitle */ self.trackHasSecondarySubtitleSupport = function (track, player = self._currentPlayer) { - if (!player) return false; + if (!player || !track) return false; const format = (track.Codec || '').toLowerCase(); // Currently, only non-SSA/non-ASS external subtitles are supported. // Showing secondary subtitles does not work with any SSA/ASS subtitle combinations because