@pisell/pisellos 0.0.137 → 0.0.138

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.
@@ -559,7 +559,7 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
559
559
  key: "storeProduct",
560
560
  value: function () {
561
561
  var _storeProduct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(productData) {
562
- var activeAccount, _ref4, bundle, options, origin, product_variant_id, _ref4$quantity, quantity, rowKey, cartItems, targetCartItem, currentAccount, targetAccount, isSameAccount, product, addCartItem;
562
+ var activeAccount, _ref4, bundle, options, origin, product_variant_id, _ref4$quantity, quantity, rowKey, cartItems, currentAccount, targetCartItem, targetAccount, isSameAccount, product, addCartItem;
563
563
  return _regeneratorRuntime().wrap(function _callee7$(_context8) {
564
564
  while (1) switch (_context8.prev = _context8.next) {
565
565
  case 0:
@@ -572,11 +572,11 @@ export var BookingByStepImpl = /*#__PURE__*/function (_BaseModule) {
572
572
  _context8.next = 12;
573
573
  break;
574
574
  }
575
+ currentAccount = this.store.accountList.getActiveAccount();
575
576
  targetCartItem = cartItems.find(function (n) {
576
577
  var _n$_productOrigin;
577
- return ((_n$_productOrigin = n._productOrigin) === null || _n$_productOrigin === void 0 ? void 0 : _n$_productOrigin.rowKey) === rowKey;
578
+ return ((_n$_productOrigin = n._productOrigin) === null || _n$_productOrigin === void 0 ? void 0 : _n$_productOrigin.rowKey) === rowKey && n.holder_id === (currentAccount === null || currentAccount === void 0 ? void 0 : currentAccount.getId());
578
579
  });
579
- currentAccount = this.store.accountList.getActiveAccount();
580
580
  targetAccount = targetCartItem === null || targetCartItem === void 0 ? void 0 : targetCartItem.holder_id;
581
581
  isSameAccount = (currentAccount === null || currentAccount === void 0 ? void 0 : currentAccount.getId()) === targetAccount;
582
582
  if (!(targetCartItem && isNormalProduct(targetCartItem._productOrigin) && isSameAccount)) {
@@ -347,11 +347,11 @@ var BookingByStepImpl = class extends import_BaseModule.BaseModule {
347
347
  const { bundle, options, origin, product_variant_id, quantity = 1, rowKey } = productData || {};
348
348
  const cartItems = this.store.cart.getItems();
349
349
  if (rowKey) {
350
+ const currentAccount = this.store.accountList.getActiveAccount();
350
351
  const targetCartItem = cartItems.find((n) => {
351
352
  var _a;
352
- return ((_a = n._productOrigin) == null ? void 0 : _a.rowKey) === rowKey;
353
+ return ((_a = n._productOrigin) == null ? void 0 : _a.rowKey) === rowKey && n.holder_id === (currentAccount == null ? void 0 : currentAccount.getId());
353
354
  });
354
- const currentAccount = this.store.accountList.getActiveAccount();
355
355
  const targetAccount = targetCartItem == null ? void 0 : targetCartItem.holder_id;
356
356
  const isSameAccount = (currentAccount == null ? void 0 : currentAccount.getId()) === targetAccount;
357
357
  if (targetCartItem && (0, import_utils4.isNormalProduct)(targetCartItem._productOrigin) && isSameAccount) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "@pisell/pisellos",
4
- "version": "0.0.137",
4
+ "version": "0.0.138",
5
5
  "description": "一个可扩展的前端模块化SDK框架,支持插件系统",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",