@pisell/pisellos 3.0.29 → 3.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -180,6 +180,12 @@ export var formatDiscountToCartItemOrigin = function formatDiscountToCartItemOri
|
|
|
180
180
|
origin.product = {};
|
|
181
181
|
}
|
|
182
182
|
origin.product.discount_list = discounts;
|
|
183
|
+
} else {
|
|
184
|
+
// 如果折扣为空,则清空折扣列表
|
|
185
|
+
if (!origin.product) {
|
|
186
|
+
origin.product = {};
|
|
187
|
+
}
|
|
188
|
+
origin.product.discount_list = [];
|
|
183
189
|
}
|
|
184
190
|
return origin;
|
|
185
191
|
};
|
|
@@ -187,6 +187,11 @@ var formatDiscountToCartItemOrigin = (params) => {
|
|
|
187
187
|
origin.product = {};
|
|
188
188
|
}
|
|
189
189
|
origin.product.discount_list = discounts;
|
|
190
|
+
} else {
|
|
191
|
+
if (!origin.product) {
|
|
192
|
+
origin.product = {};
|
|
193
|
+
}
|
|
194
|
+
origin.product.discount_list = [];
|
|
190
195
|
}
|
|
191
196
|
return origin;
|
|
192
197
|
};
|