sanity 5.29.0-next.13 → 5.29.0-next.15

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.
@@ -1,4 +1,4 @@
1
- var version = "5.29.0-next.13+054950f5ec";
1
+ var version = "5.29.0-next.15+46f9caa2b9";
2
2
  let buildVersion;
3
3
  try {
4
4
  buildVersion = process.env.PKG_BUILD_VERSION;
@@ -7,7 +7,7 @@ try {
7
7
  try {
8
8
  buildVersion = buildVersion || // This is replaced by `@sanity/pkg-utils` at build time
9
9
  // and must always be references by its full static name, e.g. no optional chaining, no `if (process && process.env)` etc.
10
- "5.29.0-next.13+054950f5ec";
10
+ "5.29.0-next.15+46f9caa2b9";
11
11
  } catch {
12
12
  }
13
13
  const SANITY_VERSION = buildVersion || `${version}-dev`;
package/lib/index.js CHANGED
@@ -7902,8 +7902,9 @@ async function resolveInitialArrayValue(type, params, maxDepth, context, options
7902
7902
  return Promise.all(initialArray.map(async (initialItem) => {
7903
7903
  const itemType = getItemType$1(type, initialItem);
7904
7904
  return isObjectSchemaType(itemType) ? {
7905
- ...initialItem,
7906
- ...await resolveInitialValueForType(itemType, params, maxDepth - 1, context, options),
7905
+ // The initial value defined on the parent array field takes precedence over
7906
+ // initial values resolved from the array member type's own fields.
7907
+ ...deepAssign(await resolveInitialValueForType(itemType, params, maxDepth - 1, context, options) || {}, initialItem),
7907
7908
  _key: randomKey$1()
7908
7909
  } : initialItem;
7909
7910
  }));