Skip to content

Commit 93bc89f

Browse files
Fix quotes to add type validation before the multiplication
1 parent fb3167e commit 93bc89f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

react/utils/helpers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export const initQuoteFromOrderForm = (orderForm: any) => {
1717
} else {
1818
quoteItems.push({
1919
...item,
20-
listPrice: item.listPrice * 100,
21-
price: item.price * 100,
22-
sellingPrice: item.sellingPrice * 100,
20+
listPrice: typeof item.listPrice === 'number' ? item.listPrice * 100 : 0,
21+
price: typeof item.price === 'number' ? item.price * 100 : 0,
22+
sellingPrice: typeof item.sellingPrice === 'number' ? item.sellingPrice * 100 : 0,
2323
})
2424
}
2525
})

0 commit comments

Comments
 (0)