Skip to content

Commit

Permalink
fix(captions): Added missing conditional to avoid issues if caption l…
Browse files Browse the repository at this point in the history
…ayer is not ready to show captions
  • Loading branch information
rafa8626 committed Sep 18, 2018
1 parent 9feff69 commit 10e5bba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/openplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4049,7 +4049,7 @@ var Captions = function () {
}, {
key: "_show",
value: function _show() {
if (!this.current || this.current.cues === undefined) {
if (!this.captions || !this.current || this.current.cues === undefined) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion dist/openplayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/js/controls/captions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ class Captions implements PlayerComponent {
* @memberof Captions
*/
private _show(): void {
if (!this.current || this.current.cues === undefined) {
if (!this.captions || !this.current || this.current.cues === undefined) {
return;
}

Expand Down

0 comments on commit 10e5bba

Please sign in to comment.