@nuskin/ns-shop 5.18.1 → 5.18.2
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 +1 -1
- package/src/cart/cart.js +0 -3
- package/src/cart/persistentCartService.js +5 -3
- package/src/receiver.js +1 -0
package/package.json
CHANGED
package/src/cart/cart.js
CHANGED
|
@@ -1310,9 +1310,6 @@ export default function Cart(cartData) {
|
|
|
1310
1310
|
if (doneSyncingPersistedCart) {
|
|
1311
1311
|
publishCartQtyChange(json, referrer);
|
|
1312
1312
|
}
|
|
1313
|
-
if (window.ReactNativeWebView) {
|
|
1314
|
-
window.ReactNativeWebView.postMessage(JSON.stringify({name: 'cart_quantity', payload: json.cartInfo.qty}));
|
|
1315
|
-
}
|
|
1316
1313
|
json.pcId = id;
|
|
1317
1314
|
json.pcVersion = version;
|
|
1318
1315
|
json.pcType = type;
|
|
@@ -865,9 +865,6 @@ const persistCartUpdates = async () => {
|
|
|
865
865
|
let loadCartType = null;
|
|
866
866
|
|
|
867
867
|
if (pcActions.hasItems()) {
|
|
868
|
-
// removeCart = pcActions.hasRemoveCartItem();
|
|
869
|
-
// loadCartType = pcActions.hasLoadCartItem();
|
|
870
|
-
|
|
871
868
|
// even though there is no need to process the queue if there is a removeCart
|
|
872
869
|
// or a loadCart action they still need to get marked as processed so they will
|
|
873
870
|
// get removed.
|
|
@@ -904,6 +901,11 @@ const persistCartUpdates = async () => {
|
|
|
904
901
|
if (!(removeCart || loadCartType) && actions.length > 0) {
|
|
905
902
|
await doPersistentUpdates(actions, pcId, pcVersion, pcType);
|
|
906
903
|
}
|
|
904
|
+
if (removeCart || loadCartType || actions.length > 0) {
|
|
905
|
+
if (window.ReactNativeWebView) {
|
|
906
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({name: 'cart_quantity', payload: CartService.getItemCnt()}));
|
|
907
|
+
}
|
|
908
|
+
}
|
|
907
909
|
if (pcActions.hasItems()) {
|
|
908
910
|
clearTimeout(timerId);
|
|
909
911
|
timerId = setTimeout(timerCallback, 200);
|