Skip to content

Commit

Permalink
refactor: use pop() insteadof [length -1]
Browse files Browse the repository at this point in the history
  • Loading branch information
azu committed Feb 21, 2018
1 parent 3fb0f90 commit 01260de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helper/fragment-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class FragmentTracker extends EventHandler {
return null;
} else {
// https://github.com/video-dev/hls.js/pull/1545#discussion_r166229566
const bufferedFragKey = bufferedFrags[bufferedFrags.length - 1];
const bufferedFragKey = bufferedFrags.pop();
return fragments[bufferedFragKey].body;
}
}
Expand Down

0 comments on commit 01260de

Please sign in to comment.