Fix for when an amount changes from having a separate currency value, to the currency being one string with the amount.
This commit is contained in:
parent
7e9cfa77c4
commit
d81f194f87
1 changed files with 8 additions and 7 deletions
|
|
@ -63,14 +63,15 @@ angular.module('bitcoincom.directives')
|
||||||
};
|
};
|
||||||
|
|
||||||
var formatNumbers = function() {
|
var formatNumbers = function() {
|
||||||
|
|
||||||
if (!$scope.currency && $scope.value) { // If there is no currency available..
|
// During watch, may be changed from having a separate currency value,
|
||||||
// Try to extract currency from value..
|
// to both being in value. Don't want to use previous currency value.
|
||||||
var currencySplit = $scope.value.split(" ");
|
// Try to extract currency from value..
|
||||||
if (currencySplit.length === 2) {
|
var currencySplit = $scope.value.split(" ");
|
||||||
$scope.currency = currencySplit[1];
|
if (currencySplit.length === 2) {
|
||||||
}
|
$scope.currency = currencySplit[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var parsed = parseFloat($scope.value);
|
var parsed = parseFloat($scope.value);
|
||||||
var valueFormatted = '';
|
var valueFormatted = '';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue