Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit f1c8905

Browse files
committed
bundle sku find issue fixed
1 parent baab268 commit f1c8905

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/store/modules/cart/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ EventBus.$on('servercart-after-pulled', (event) => { // example stock check call
9595
for (const clientItem of clientItems) {
9696
cartHasItems = true
9797
const serverItem = serverItems.find((itm) => {
98-
return itm.sku === clientItem.sku || itm.sku.indexOf(clientItem.sku + '-') >= 0 /* bundle products */
98+
return itm.sku === clientItem.sku || itm.sku.indexOf(clientItem.sku + '-') === 0 /* bundle products */
9999
})
100100

101101
if (!serverItem) {
@@ -138,7 +138,7 @@ EventBus.$on('servercart-after-pulled', (event) => { // example stock check call
138138
for (const serverItem of serverItems) {
139139
if (serverItem) {
140140
const clientItem = clientItems.find((itm) => {
141-
return itm.sku === serverItem.sku || serverItem.sku.indexOf(itm.sku + '-') >= 0 /* bundle products */
141+
return itm.sku === serverItem.sku || serverItem.sku.indexOf(itm.sku + '-') === 0 /* bundle products */
142142
})
143143
if (!clientItem) {
144144
console.log('No client item for ' + serverItem.sku)

0 commit comments

Comments
 (0)