Fix an issue with invalid masternode count
-This fix prevents an error from being thrown that crashes the explorer when trying to use a masternode count that is a sinlge number. A single number masternode count is not valid or usable since it cannot differentiate the number of good and bad nodes, but the explorer will no longer crash when given this data
This commit is contained in:
+1
-1
@@ -154,7 +154,7 @@ function normalizeMasternodeCount(raw_count) {
|
||||
total: splitCount[1].trim()
|
||||
};
|
||||
// check if the data is in the format of "Total: {total_count} Enabled: {enabled_count}"
|
||||
} else if (raw_count.indexOf('Total: ') > -1 && raw_count.indexOf('Enabled: ')) {
|
||||
} else if (raw_count.toString().indexOf('Total: ') > -1 && raw_count.toString().indexOf('Enabled: ')) {
|
||||
// Total: {total_count} Enabled: {enabled_count}" format detected
|
||||
const totalRegex = /Total: (\d+)/;
|
||||
const enabledRegex = /Enabled: (\d+)/;
|
||||
|
||||
Reference in New Issue
Block a user