diff --git a/src/js/player.js b/src/js/player.js index 56e300e991..586c402095 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -659,17 +659,18 @@ class Player extends Component { if (value === '') { // If an empty string is given, reset the dimension to be automatic this[privDimension] = undefined; - } else { - const parsedVal = parseFloat(value); + this.updateStyleEl_(); + return; + } - if (isNaN(parsedVal)) { - log.error(`Improper value "${value}" supplied for for ${dimension}`); - return; - } + const parsedVal = parseFloat(value); - this[privDimension] = parsedVal; + if (isNaN(parsedVal)) { + log.error(`Improper value "${value}" supplied for for ${dimension}`); + return; } + this[privDimension] = parsedVal; this.updateStyleEl_(); }