Skip to content

Commit

Permalink
Merge pull request embedly#5 from dokipen/master
Browse files Browse the repository at this point in the history
Constructor works without 'new'
  • Loading branch information
dokipen committed Jan 28, 2014
2 parents 721b05c + c8e67e5 commit 7c99c67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
*/

playerjs.Player = function(elem, options){
if (!(this instanceof playerjs.Player)) {
return new playerjs.Player(elem, options);
}
this.init(elem, options);
};

Expand Down

0 comments on commit 7c99c67

Please sign in to comment.