Formatter displays blank amount when value is NaN.
This commit is contained in:
parent
b1a1f24d93
commit
29a5a37c02
1 changed files with 5 additions and 0 deletions
|
|
@ -62,6 +62,11 @@ angular.module('bitcoincom.directives')
|
||||||
};
|
};
|
||||||
|
|
||||||
var formatNumbers = function(currency, value) {
|
var formatNumbers = function(currency, value) {
|
||||||
|
if (isNaN(parseFloat($scope.value))) {
|
||||||
|
buildAmount('', '', '');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (getDecimalPlaces(currency)) {
|
switch (getDecimalPlaces(currency)) {
|
||||||
case '0':
|
case '0':
|
||||||
var valueFormatted = localizeNumbers(Math.round(parseFloat(value)));
|
var valueFormatted = localizeNumbers(Math.round(parseFloat(value)));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue