Fix undefined prices error (#1173)

This commit is contained in:
KoalaSat
2024-03-14 12:55:42 +01:00
committed by GitHub
parent 5f8c25c52c
commit 2b5bc9062e

View File

@ -9,7 +9,7 @@ export interface Limit {
export type LimitList = Record<string, Limit>; export type LimitList = Record<string, Limit>;
export const compareUpdateLimit = (baseL: Limit, newL: Limit): Limit => { export const compareUpdateLimit = (baseL: Limit, newL: Limit): Limit => {
if (baseL == null) { if (!baseL) {
return newL; return newL;
} else { } else {
const price = (baseL.price + newL.price) / 2; const price = (baseL.price + newL.price) / 2;