Permalink
Browse files

refactor: player.dimension() (#4704)

  • Loading branch information...
kocoten1992 authored and gkatsev committed Nov 1, 2017
1 parent 9acbcd8 commit ad1b47bf84dc2600c6cd2a224cd1c1e9ea1d791d
Showing with 8 additions and 7 deletions.
  1. +8 −7 src/js/player.js
View
@@ -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_();
}

0 comments on commit ad1b47b

Please sign in to comment.