Skip to content

Commit

Permalink
avoid error when using getCurrentTrackFor with unknown type (example …
Browse files Browse the repository at this point in the history
…with fragmentedText type not used anymore) (#3693)
  • Loading branch information
jeffcunat committed Jun 30, 2021
1 parent 8f3a1bd commit a73d6d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/streaming/controllers/MediaController.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function MediaController() {
* @memberof MediaController#
*/
function getCurrentTrackFor(type, streamId) {
if (!type || !tracks[streamId]) return null;
if (!type || !tracks[streamId] || !tracks[streamId][type]) return null;
return tracks[streamId][type].current;
}

Expand Down

0 comments on commit a73d6d4

Please sign in to comment.