fix: formatCredits zero value

This commit is contained in:
Akinwale Ariwodola 2019-10-11 17:42:06 +01:00
parent f06e1e64a8
commit dff1ecb195
2 changed files with 3 additions and 3 deletions

4
dist/bundle.es.js vendored
View file

@ -1890,7 +1890,7 @@ function formatCredits(amount, precision, shortFormat = false) {
let actualPrecision = parseFloat(precision);
let suffix = '';
if (Number.isNaN(actualAmount)) return '0';
if (Number.isNaN(actualAmount) || actualAmount === 0) return '0';
if (actualAmount >= 1000000) {
if (precision <= 7) {
@ -2563,7 +2563,7 @@ function doUpdateChannel(params) {
updateParams.tags = params.tags.map(tag => tag.name);
}
//we'll need to remove these once we add locations/channels to channel page edit/create options
// we'll need to remove these once we add locations/channels to channel page edit/create options
if (channelClaim && channelClaim.value && channelClaim.value.locations) {
updateParams.locations = channelClaim.value.locations;

View file

@ -9,7 +9,7 @@ export function formatCredits(amount, precision, shortFormat = false) {
let actualPrecision = parseFloat(precision);
let suffix = '';
if (Number.isNaN(actualAmount)) return '0';
if (Number.isNaN(actualAmount) || actualAmount === 0) return '0';
if (actualAmount >= 1000000) {
if (precision <= 7) {