fix: formatCredits zero value
This commit is contained in:
parent
f06e1e64a8
commit
dff1ecb195
2 changed files with 3 additions and 3 deletions
4
dist/bundle.es.js
vendored
4
dist/bundle.es.js
vendored
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue