From 2b5bc9062edafa0635f4951daed57d3e3560494d Mon Sep 17 00:00:00 2001 From: KoalaSat Date: Thu, 14 Mar 2024 12:55:42 +0100 Subject: [PATCH] Fix undefined prices error (#1173) --- frontend/src/models/Limit.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/models/Limit.model.ts b/frontend/src/models/Limit.model.ts index f5bf7320..ccf5e443 100644 --- a/frontend/src/models/Limit.model.ts +++ b/frontend/src/models/Limit.model.ts @@ -9,7 +9,7 @@ export interface Limit { export type LimitList = Record; export const compareUpdateLimit = (baseL: Limit, newL: Limit): Limit => { - if (baseL == null) { + if (!baseL) { return newL; } else { const price = (baseL.price + newL.price) / 2;