@dxos/react-ui-form 0.8.2-main.12df754 → 0.8.2-main.36232bc

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.
@@ -944,10 +944,10 @@ var padding = "px-2";
944
944
  var ArrayField = ({ property, readonly, path, inputProps, Custom, lookupComponent }) => {
945
945
  const { t } = useTranslation5(translationKey);
946
946
  const { ast, name, type, title } = property;
947
- const values = useFormValues(path ?? []);
947
+ const values = useFormValues(path ?? []) ?? [];
948
948
  invariant2(Array.isArray(values), `Values at path ${path?.join(".")} must be an array.`, {
949
949
  F: __dxlog_file2,
950
- L: 37,
950
+ L: 39,
951
951
  S: void 0,
952
952
  A: [
953
953
  "Array.isArray(values)",
@@ -1780,13 +1780,25 @@ var formatForDisplay = ({ type, format, value, locale = void 0 }) => {
1780
1780
  });
1781
1781
  }
1782
1782
  case FormatEnum4.Date: {
1783
- return formatDate(new Date(value), "yyyy-MM-dd");
1783
+ try {
1784
+ return formatDate(new Date(value), "yyyy-MM-dd");
1785
+ } catch (error) {
1786
+ return "Invalid Date";
1787
+ }
1784
1788
  }
1785
1789
  case FormatEnum4.Time: {
1786
- return formatDate(new Date(value), "HH:mm:ss");
1790
+ try {
1791
+ return formatDate(new Date(value), "HH:mm:ss");
1792
+ } catch (error) {
1793
+ return "Invalid Time";
1794
+ }
1787
1795
  }
1788
1796
  case FormatEnum4.DateTime: {
1789
- return formatDate(new Date(value), "yyyy-MM-dd HH:mm:ss");
1797
+ try {
1798
+ return formatDate(new Date(value), "yyyy-MM-dd HH:mm:ss");
1799
+ } catch (error) {
1800
+ return "Invalid DateTime";
1801
+ }
1790
1802
  }
1791
1803
  case FormatEnum4.GeoPoint: {
1792
1804
  if (value === null || value === void 0) {