@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.
@@ -218,7 +218,7 @@ export declare class ShoppingCart<T extends ShoppingCartItem> {
218
218
  * Cached prices
219
219
  * 缓存的价格
220
220
  */
221
- private readonly prices;
221
+ private prices;
222
222
  /**
223
223
  * Onchange callback
224
224
  * 改变时回调
@@ -219,6 +219,7 @@ class ShoppingCart {
219
219
  clear(keepOwner) {
220
220
  this.items.length = 0;
221
221
  this.promotions.length = 0;
222
+ this.prices = {};
222
223
  if (keepOwner) {
223
224
  this.save();
224
225
  }
@@ -218,7 +218,7 @@ export declare class ShoppingCart<T extends ShoppingCartItem> {
218
218
  * Cached prices
219
219
  * 缓存的价格
220
220
  */
221
- private readonly prices;
221
+ private prices;
222
222
  /**
223
223
  * Onchange callback
224
224
  * 改变时回调
@@ -216,6 +216,7 @@ export class ShoppingCart {
216
216
  clear(keepOwner) {
217
217
  this.items.length = 0;
218
218
  this.promotions.length = 0;
219
+ this.prices = {};
219
220
  if (keepOwner) {
220
221
  this.save();
221
222
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.4.50",
3
+ "version": "1.4.51",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -334,7 +334,7 @@ export class ShoppingCart<T extends ShoppingCartItem> {
334
334
  * Cached prices
335
335
  * 缓存的价格
336
336
  */
337
- private readonly prices: Record<T['id'], number> = {} as any;
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();