sanity 5.7.0-next.23 → 5.7.0-next.25
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/lib/_chunks-es/package.js +1 -1
- package/lib/_chunks-es/pane.js +5 -1
- package/lib/_chunks-es/pane.js.map +1 -1
- package/lib/_chunks-es/version.js +1 -1
- package/lib/index.js +30 -18
- package/lib/index.js.map +1 -1
- package/package.json +11 -11
package/lib/_chunks-es/pane.js
CHANGED
|
@@ -12496,7 +12496,11 @@ function getPathTitles(options) {
|
|
|
12496
12496
|
return result;
|
|
12497
12497
|
if (!isRecord(v))
|
|
12498
12498
|
throw new Error(`Array item not found: [_key == ${segment._key}]`);
|
|
12499
|
-
|
|
12499
|
+
let ofType = s.of.find((i) => isRecord(v) && i.name === v?._type);
|
|
12500
|
+
if (!ofType && !v?._type) {
|
|
12501
|
+
const objectTypes = s.of.filter((i) => i.jsonType === "object");
|
|
12502
|
+
objectTypes.length === 1 && (ofType = objectTypes[0]);
|
|
12503
|
+
}
|
|
12500
12504
|
if (!ofType)
|
|
12501
12505
|
throw new Error(`Array item type not found: .${v?._type}`);
|
|
12502
12506
|
s = ofType, result.push(s);
|