mirror of
https://github.com/mempool/mempool.git
synced 2025-02-24 06:47:52 +01:00
Merge pull request #3586 from mempool/nymkappa/fix-price-undefined
Add missing sanity check when fetching single price datapoint
This commit is contained in:
commit
83c03474a9
1 changed files with 1 additions and 1 deletions
|
@ -160,7 +160,7 @@ class PricesRepository {
|
|||
|
||||
// Compute fiat exchange rates
|
||||
let latestPrice = rates[0] as ApiPrice;
|
||||
if (latestPrice.USD === -1) {
|
||||
if (!latestPrice || latestPrice.USD === -1) {
|
||||
latestPrice = priceUpdater.getEmptyPricesObj();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue