magneto365.ui 2.70.3 → 2.70.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/dist/cjs/index.js CHANGED
@@ -4722,10 +4722,8 @@ var JobCardDesktop = function (_a) {
4722
4722
  var optionsRef = React.useRef(null);
4723
4723
  var width = useWithElement(optionsRef);
4724
4724
  var citiesformatted = React.useMemo(function () {
4725
- if ((cities === null || cities === void 0 ? void 0 : cities.length) > 5) {
4726
- return cities === null || cities === void 0 ? void 0 : cities.slice(0, 5).join(', ');
4727
- }
4728
- return cities === null || cities === void 0 ? void 0 : cities.join(', ');
4725
+ var safeCities = Array.isArray(cities) ? cities : [];
4726
+ return safeCities.length > 5 ? safeCities.slice(0, 5).join(', ') : safeCities.join(', ');
4729
4727
  }, [cities]);
4730
4728
  return (React__default["default"].createElement("div", { className: cx$J("".concat(classMUI, "-card-jobs__container"), jobOpen && "".concat(classMUI, "-card-jobs--job-open")) },
4731
4729
  React__default["default"].createElement("article", { onClick: showDetail, className: cx$J("".concat(classMUI, "-card-jobs"), urgent && "".concat(classMUI, "-card-jobs--urgent")) },