@nuskin/ns-shop 7.8.0-pa-902.2 → 7.8.0
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
|
@@ -746,6 +746,11 @@ const persistLocalItems = async (cartItems, authInfo) => {
|
|
|
746
746
|
syncCartItems(pCart);
|
|
747
747
|
}
|
|
748
748
|
} catch (error) {
|
|
749
|
+
if (error.status === 403) {
|
|
750
|
+
// user not allowed to shop in market
|
|
751
|
+
CartService.clearCart();
|
|
752
|
+
events.setValue(events.shop.HOME_MARKET_ONLY_RESTRICTED, true);
|
|
753
|
+
}
|
|
749
754
|
console.error('There was an error persisting local items to cart!', error);
|
|
750
755
|
}
|
|
751
756
|
return pCart;
|
|
@@ -845,6 +850,11 @@ const doPersistentUpdates = async (actions, pcId, pcVersion, pcType) => {
|
|
|
845
850
|
}
|
|
846
851
|
syncCartItems(pCart);
|
|
847
852
|
} catch (err) {
|
|
853
|
+
if (err.status === 403) {
|
|
854
|
+
// user not allowed to shop in market
|
|
855
|
+
CartService.clearCart();
|
|
856
|
+
events.setValue(events.shop.HOME_MARKET_ONLY_RESTRICTED, true);
|
|
857
|
+
}
|
|
848
858
|
console.error('Failed to update persisted cart', err && err.response && err.response.data ? err.response.data : err);
|
|
849
859
|
}
|
|
850
860
|
};
|