@firecms/core 3.0.0-canary.73 → 3.0.0-canary.75

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.73",
4
+ "version": "3.0.0-canary.75",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -46,8 +46,8 @@
46
46
  "./package.json": "./package.json"
47
47
  },
48
48
  "dependencies": {
49
- "@firecms/formex": "^3.0.0-canary.73",
50
- "@firecms/ui": "^3.0.0-canary.73",
49
+ "@firecms/formex": "^3.0.0-canary.75",
50
+ "@firecms/ui": "^3.0.0-canary.75",
51
51
  "@fontsource/jetbrains-mono": "^5.0.20",
52
52
  "@hello-pangea/dnd": "^16.6.0",
53
53
  "@radix-ui/react-portal": "^1.0.4",
@@ -111,7 +111,7 @@
111
111
  "dist",
112
112
  "src"
113
113
  ],
114
- "gitHead": "3d43eb099c5584b289cb3189c25ac3c7cbb286f1",
114
+ "gitHead": "0ea6abe4e3b3d017e31062ae6184902ae7a425de",
115
115
  "publishConfig": {
116
116
  "access": "public"
117
117
  },
@@ -48,12 +48,12 @@ export function getDefaultValuesFor<M extends Record<string, any>>(properties: P
48
48
 
49
49
  export function getDefaultValueFor(property: PropertyOrBuilder) {
50
50
  if (isPropertyBuilder(property)) return undefined;
51
- if (property.dataType === "map" && property.properties) {
51
+ if (property.defaultValue || property.defaultValue === null) {
52
+ return property.defaultValue;
53
+ } else if (property.dataType === "map" && property.properties) {
52
54
  const defaultValuesFor = getDefaultValuesFor(property.properties as Properties);
53
55
  if (Object.keys(defaultValuesFor).length === 0) return undefined;
54
56
  return defaultValuesFor;
55
- } else if (property.defaultValue || property.defaultValue === null) {
56
- return property.defaultValue;
57
57
  } else {
58
58
  return getDefaultValueForDataType(property.dataType);
59
59
  }