Skip to content

Commit

Permalink
fix(player): Added default value when no options are passed to the pl…
Browse files Browse the repository at this point in the history
…ayer
  • Loading branch information
rafa8626 committed Oct 15, 2018
1 parent fb1f50e commit aed189f
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 @@ -1379,7 +1379,7 @@ var Player = function () {
this.fill = fill;
this.autoplay = this.element.autoplay || false;
this.volume = this.element.volume;
this.options = deepmerge_1.default(this.defaultOptions, options);
this.options = deepmerge_1.default(this.defaultOptions, options || {});
this.element.autoplay = false;
}

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/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class Player {
this.fill = fill;
this.autoplay = this.element.autoplay || false;
this.volume = this.element.volume;
this.options = merge(this.defaultOptions, options);
this.options = merge(this.defaultOptions, options || {});
this.element.autoplay = false;
}
return this;
Expand Down

0 comments on commit aed189f

Please sign in to comment.