fix: prevent runtime error by adding null check for reward in _getDiscountableOnOrder
This commit is contained in:
parent
f17f353cbd
commit
e80a34711a
@ -11,6 +11,9 @@ patch(PosOrder.prototype, {
|
|||||||
* Override to calculate discountable amount without tax for all reward types
|
* Override to calculate discountable amount without tax for all reward types
|
||||||
*/
|
*/
|
||||||
_getDiscountableOnOrder(reward) {
|
_getDiscountableOnOrder(reward) {
|
||||||
|
if (!reward) {
|
||||||
|
return { discountable: 0, discountablePerTax: {} };
|
||||||
|
}
|
||||||
let discountable = 0;
|
let discountable = 0;
|
||||||
const discountablePerTax = {};
|
const discountablePerTax = {};
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user