fix: prevent potential errors by adding optional chaining to rewardProgram access in pos_order_patch
This commit is contained in:
parent
a8f4095765
commit
ca97bab9c4
@ -57,7 +57,7 @@ patch(PosOrder.prototype, {
|
||||
}
|
||||
for (const program of programs) {
|
||||
// Skip lines for the current program's discounts.
|
||||
if (isDiscount && rewardProgram.id === program.id) {
|
||||
if (isDiscount && rewardProgram?.id === program.id) {
|
||||
continue;
|
||||
}
|
||||
for (const rule of program.rule_ids) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user