Skip to content

Commit 613c78f

Browse files
committed
refactor(uiScientificNotationMask): simplify value formater
1 parent 0ed0116 commit 613c78f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/global/scientific-notation/scientific-notation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ function ScientificNotationMaskDirective($locale, $parse) {
4949
return value;
5050
}
5151

52-
if (typeof value === 'string') {
53-
value = value.replace(decimalDelimiter, '.');
54-
} else if (typeof value === 'number') {
52+
if (typeof value === 'number') {
5553
value = value.toExponential(decimals);
54+
} else {
55+
value = value.toString().replace(decimalDelimiter, '.');
5656
}
5757

5858
var formattedValue, exponent;

0 commit comments

Comments
 (0)