🐛 fix(subscribe): Handle optional values in price and discount calculations
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user