Fix undefined prices error

This commit is contained in:
KoalaSat
2024-03-10 18:25:35 +01:00
parent a20defbbd3
commit 77da5a0792

View File

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