🐛 fix(subscribe): Handle optional values in price and discount calculations

This commit is contained in:
web@ppanel
2025-03-18 14:50:48 +07:00
parent fa56eb8293
commit 5939763b57
2 changed files with 3 additions and 4 deletions
@@ -36,7 +36,7 @@ export function ObjectInput<T extends Record<string, any>>({
let updatedState = { ...internalState, ...value };
fields.forEach((field) => {
if (field.calculateValue) {
if (field?.calculateValue) {
updatedState = field.calculateValue(updatedState);
}
});