From 58f886b33714d811296581c2572e39f53c6f423e Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Thu, 23 Feb 2023 18:40:13 +0900 Subject: [PATCH] If we don't have a price for "single price" query then return empty price --- frontend/src/app/services/price.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/app/services/price.service.ts b/frontend/src/app/services/price.service.ts index ef1a973a1..8a93d9554 100644 --- a/frontend/src/app/services/price.service.ts +++ b/frontend/src/app/services/price.service.ts @@ -82,6 +82,9 @@ export class PriceService { return this.singlePriceObservable$.pipe( map((conversion) => { + if (conversion.prices.length <= 0) { + return this.getEmptyPrice(); + } return { price: { USD: conversion.prices[0].USD, EUR: conversion.prices[0].EUR, GBP: conversion.prices[0].GBP, CAD: conversion.prices[0].CAD,