Use Base.pick() instead of null check.

This commit is contained in:
Jürg Lehni 2015-10-27 23:43:14 +01:00
parent 60c64ab25c
commit 6c0faaf010

View file

@ -20,7 +20,7 @@ var Formatter = Base.extend(/** @lends Formatter# */{
* @param {Number} [precision=5] the amount of fractional digits
*/
initialize: function(precision) {
this.precision = precision == null ? 5 : precision;
this.precision = Base.pick(precision, 5);
this.multiplier = Math.pow(10, this.precision);
},