@nuskin/ns-shop 7.5.4-pa-64.1 → 7.5.4-pa-64.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
CHANGED
|
@@ -166,7 +166,7 @@ let PickupUtil = function() {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
function getShipToData(order) {
|
|
169
|
-
const shippingParties = (order.shipping && order.shipping.shippingParties) || [];
|
|
169
|
+
const shippingParties = (order && order.shipping && order.shipping.shippingParties) || [];
|
|
170
170
|
const shipTo = shippingParties.find((sp) => sp.type === 'SHIP_TO');
|
|
171
171
|
return shipTo ? {
|
|
172
172
|
country: shipTo.shippingAddress.address.countryCode,
|
|
@@ -181,7 +181,7 @@ let PickupUtil = function() {
|
|
|
181
181
|
let same = false;
|
|
182
182
|
const shipping = sessionStorage.getItem('shipping');
|
|
183
183
|
|
|
184
|
-
if (
|
|
184
|
+
if (shipping) {
|
|
185
185
|
const storedPayload = JSON.parse(shipping).payload;
|
|
186
186
|
const shipData = getShipToData(payload.order);
|
|
187
187
|
const storedShipData = getShipToData(storedPayload.order);
|