@nuskin/ns-shop 7.9.1-td-4379.4 → 7.9.1-td-4379.5
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
|
@@ -414,11 +414,11 @@ function getSessionShopURL() {
|
|
|
414
414
|
const sessionStorefront = sessionStorage.getItem('storefront') ? JSON.parse(sessionStorage.getItem('storefront')) : null;
|
|
415
415
|
let url;
|
|
416
416
|
|
|
417
|
-
if (
|
|
418
|
-
if (shoppingContext
|
|
417
|
+
if (shoppingContext && sessionStorefront && sessionStorefront.user) {
|
|
418
|
+
if (shoppingContext.context === "storefront" && sessionStorefront.user.shopUrl) {
|
|
419
419
|
const shopUrl = sessionStorefront.user.shopUrl;
|
|
420
420
|
url = `/${market.toLowerCase()}/${locale.toLowerCase()}/mysite/${shopUrl}/viewCart`;
|
|
421
|
-
} else if (shoppingContext
|
|
421
|
+
} else if (shoppingContext.context === 'personal_offer' && sessionStorefront.user.sapId) {
|
|
422
422
|
const sapId = sessionStorefront.user.sapId;
|
|
423
423
|
url = `/${market.toLowerCase()}/${locale.toLowerCase()}/personal-offer/${sapId}/viewCart`;
|
|
424
424
|
}
|