Skip to content

Commit

Permalink
fix: removed second param from parseFloat
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiro705 committed Sep 9, 2019
1 parent 2b854a4 commit 4b5eef9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/player-wrapper.js
Expand Up @@ -384,11 +384,11 @@ PlayerWrapper.prototype.play = function() {
PlayerWrapper.prototype.getPlayerWidth = function() {
let width = (getComputedStyle(this.vjsPlayer.el()) || {}).width;

if (!width || parseFloat(width, 10) === 0) {
if (!width || parseFloat(width) === 0) {
width = (this.vjsPlayer.el().getBoundingClientRect() || {}).width;
}

return parseFloat(width, 10) || this.vjsPlayer.width();
return parseFloat(width) || this.vjsPlayer.width();
};


Expand All @@ -400,11 +400,11 @@ PlayerWrapper.prototype.getPlayerWidth = function() {
PlayerWrapper.prototype.getPlayerHeight = function() {
let height = (getComputedStyle(this.vjsPlayer.el()) || {}).height;

if (!height || parseFloat(height, 10) === 0) {
if (!height || parseFloat(height) === 0) {
height = (this.vjsPlayer.el().getBoundingClientRect() || {}).height;
}

return parseFloat(height, 10) || this.vjsPlayer.height();
return parseFloat(height) || this.vjsPlayer.height();
};


Expand Down

0 comments on commit 4b5eef9

Please sign in to comment.