From 6c0faaf01055cce70950ccf90c5c44be7fae68dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 27 Oct 2015 23:43:14 +0100 Subject: [PATCH] Use Base.pick() instead of null check. --- src/util/Formatter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Formatter.js b/src/util/Formatter.js index 969140e7..92dece9d 100644 --- a/src/util/Formatter.js +++ b/src/util/Formatter.js @@ -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); },