Skip to content

Commit

Permalink
Fix shadowed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Jun 2, 2023
1 parent 8324542 commit ab9dbb4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/api/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2063,26 +2063,26 @@ class Player extends EventEmitter<IPublicAPIEvent> {
if (!isFound) {
// Only consider the currently-selected tracks.
// NOTE: Maybe there's room for optimizations? Unclear.
const { tracksStore } = contentInfos;
if (tracksStore === null) {
const tStore = contentInfos.tracksStore;
if (tStore === null) {
return acc;
}
let isCurrent = false;
const periodRef = tracksStore.getPeriodObjectFromPeriod(elt.period);
const periodRef = tStore.getPeriodObjectFromPeriod(elt.period);
if (periodRef === undefined) {
return acc;
}
switch (elt.adaptation.type) {
case "audio":
isCurrent = tracksStore
isCurrent = tStore
.getChosenAudioTrack(periodRef)?.id === elt.adaptation.id;
break;
case "video":
isCurrent = tracksStore
isCurrent = tStore
.getChosenVideoTrack(periodRef)?.id === elt.adaptation.id;
break;
case "text":
isCurrent = tracksStore
isCurrent = tStore
.getChosenTextTrack(periodRef)?.id === elt.adaptation.id;
break;
}
Expand Down

0 comments on commit ab9dbb4

Please sign in to comment.