Handle NaN in obligated amount input properly
- there is some hackiness to the text input portion
This commit is contained in:
@@ -11,10 +11,16 @@ export default {
|
||||
|
||||
computed: {
|
||||
formattedObligated: function() {
|
||||
return formatDollars(this.obligated)
|
||||
return formatDollars(this._filterNaN(this.obligated))
|
||||
},
|
||||
formattedContractAmount: function() {
|
||||
return formatDollars(this.contractAmount)
|
||||
return formatDollars(this._filterNaN(this.contractAmount))
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
_filterNaN: function(value) {
|
||||
return Number.isNaN(value) ? 0 : value
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user