@firecms/core 3.0.0-canary.201 → 3.0.0-canary.202

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
@@ -212,7 +212,11 @@ function mergeDeep(target, source) {
212
212
  if (targetIsObject && isObject(source)) {
213
213
  Object.keys(source).forEach((key) => {
214
214
  const sourceElement = source[key];
215
- if (isObject(sourceElement)) {
215
+ if (sourceElement instanceof Date) {
216
+ Object.assign(output, {
217
+ [key]: new Date(sourceElement.getTime())
218
+ });
219
+ } else if (isObject(sourceElement)) {
216
220
  if (!(key in target)) Object.assign(output, {
217
221
  [key]: sourceElement
218
222
  });
@@ -16678,7 +16682,8 @@ function getInitialEntityValues(collection, path, status, entity, propertyConfig
16678
16682
  if (!collection.alwaysApplyDefaultValues) {
16679
16683
  return entity.values ?? getDefaultValuesFor(properties);
16680
16684
  } else {
16681
- return mergeDeep(getDefaultValuesFor(properties), entity.values ?? {});
16685
+ const defaultValues = getDefaultValuesFor(properties);
16686
+ return mergeDeep(defaultValues, entity.values ?? {});
16682
16687
  }
16683
16688
  } else if (status === "new") {
16684
16689
  return getDefaultValuesFor(properties);