@etsoo/appscript 1.4.50 → 1.4.51
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.
package/package.json
CHANGED
|
@@ -334,7 +334,7 @@ export class ShoppingCart<T extends ShoppingCartItem> {
|
|
|
334
334
|
* Cached prices
|
|
335
335
|
* 缓存的价格
|
|
336
336
|
*/
|
|
337
|
-
private
|
|
337
|
+
private prices: Record<T['id'], number> = {} as any;
|
|
338
338
|
|
|
339
339
|
/**
|
|
340
340
|
* Onchange callback
|
|
@@ -427,6 +427,7 @@ export class ShoppingCart<T extends ShoppingCartItem> {
|
|
|
427
427
|
clear(keepOwner?: boolean) {
|
|
428
428
|
this.items.length = 0;
|
|
429
429
|
this.promotions.length = 0;
|
|
430
|
+
this.prices = {} as any;
|
|
430
431
|
|
|
431
432
|
if (keepOwner) {
|
|
432
433
|
this.save();
|