@shipengine/elements 0.32.0 → 0.32.1
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/index.cjs +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -14373,7 +14373,7 @@ const ShipmentForm = ({
|
|
|
14373
14373
|
}), [salesOrder, shipment]);
|
|
14374
14374
|
const upsCarrierId = (_c = carriers === null || carriers === void 0 ? void 0 : carriers.find(c => c.carrierCode === "ups")) === null || _c === void 0 ? void 0 : _c.carrierId;
|
|
14375
14375
|
const hasUpsOptions = React.useMemo(() => {
|
|
14376
|
-
return (packageOptions === null || packageOptions === void 0 ? void 0 : packageOptions.some(option => option.label === "UPS")) && (selectedPackage.code === "package" || selectedCarrierId === upsCarrierId);
|
|
14376
|
+
return (packageOptions === null || packageOptions === void 0 ? void 0 : packageOptions.some(option => option.label === "UPS")) && ((selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.code) === "package" || selectedCarrierId === upsCarrierId);
|
|
14377
14377
|
}, [packageOptions, selectedPackage, selectedCarrierId, upsCarrierId]);
|
|
14378
14378
|
if (isLoading) return jsxRuntime.jsx(Loader, {
|
|
14379
14379
|
message: t("loading.shipment")
|
package/index.js
CHANGED
|
@@ -14341,7 +14341,7 @@ const ShipmentForm = ({
|
|
|
14341
14341
|
}), [salesOrder, shipment]);
|
|
14342
14342
|
const upsCarrierId = (_c = carriers === null || carriers === void 0 ? void 0 : carriers.find(c => c.carrierCode === "ups")) === null || _c === void 0 ? void 0 : _c.carrierId;
|
|
14343
14343
|
const hasUpsOptions = useMemo(() => {
|
|
14344
|
-
return (packageOptions === null || packageOptions === void 0 ? void 0 : packageOptions.some(option => option.label === "UPS")) && (selectedPackage.code === "package" || selectedCarrierId === upsCarrierId);
|
|
14344
|
+
return (packageOptions === null || packageOptions === void 0 ? void 0 : packageOptions.some(option => option.label === "UPS")) && ((selectedPackage === null || selectedPackage === void 0 ? void 0 : selectedPackage.code) === "package" || selectedCarrierId === upsCarrierId);
|
|
14345
14345
|
}, [packageOptions, selectedPackage, selectedCarrierId, upsCarrierId]);
|
|
14346
14346
|
if (isLoading) return jsx(Loader, {
|
|
14347
14347
|
message: t("loading.shipment")
|