@rebasepro/client-firebase 0.2.5 → 0.4.0

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/index.es.js CHANGED
@@ -611,7 +611,8 @@ function normalizePropertiesEnumValues(properties, sortObjectFormat = false) {
611
611
  if (normalizedProperty.enum) {
612
612
  normalizedProperty.enum = normalizeEnumValuesToArray(normalizedProperty.enum, sortObjectFormat);
613
613
  }
614
- if (normalizedProperty.dataType === "array" && typeof normalizedProperty.of === "object" && normalizedProperty.of !== null) {
614
+ const propType = normalizedProperty.type ?? normalizedProperty.dataType;
615
+ if (propType === "array" && typeof normalizedProperty.of === "object" && normalizedProperty.of !== null) {
615
616
  const ofProp = normalizedProperty.of;
616
617
  if (ofProp.enum) {
617
618
  normalizedProperty.of = {
@@ -620,7 +621,7 @@ function normalizePropertiesEnumValues(properties, sortObjectFormat = false) {
620
621
  };
621
622
  }
622
623
  }
623
- if (normalizedProperty.dataType === "map" && normalizedProperty.properties) {
624
+ if (propType === "map" && normalizedProperty.properties) {
624
625
  normalizedProperty.properties = normalizePropertiesEnumValues(normalizedProperty.properties, sortObjectFormat);
625
626
  }
626
627
  result[key] = normalizedProperty;