mirror of
https://github.com/mempool/mempool.git
synced 2026-08-18 13:08:44 +02:00
Add missing sanity check when fetching single price datapoint
This commit is contained in:
parent
5977251a20
commit
ea2193a42d
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
Add a link
Reference in a new issue