@prismicio/types-internal 3.2.0-alpha.0 → 3.2.0-alpha.2
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.
|
@@ -62,15 +62,18 @@ function traverseRepeatableContent({ path, key, apiId, model, content, }) {
|
|
|
62
62
|
const itemPath = path.concat([
|
|
63
63
|
{ key: index.toString(), type: "Widget" },
|
|
64
64
|
]);
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
// Content inside repeatable can't be repeatable.
|
|
66
|
+
const newModel = (model === null || model === void 0 ? void 0 : model.type) === "Link" && model.config
|
|
67
|
+
? {
|
|
68
|
+
...model,
|
|
69
|
+
config: { ...model.config, repeat: false },
|
|
70
|
+
}
|
|
71
|
+
: model;
|
|
69
72
|
const transformedField = transform({
|
|
70
73
|
path: itemPath,
|
|
71
74
|
key: key,
|
|
72
75
|
apiId: apiId,
|
|
73
|
-
model:
|
|
76
|
+
model: newModel,
|
|
74
77
|
content: fieldContent,
|
|
75
78
|
});
|
|
76
79
|
// Can happen if the transform function returns undefined to filter out a field
|
package/package.json
CHANGED
|
@@ -113,16 +113,20 @@ export function traverseRepeatableContent({
|
|
|
113
113
|
{ key: index.toString(), type: "Widget" },
|
|
114
114
|
])
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
// Content inside repeatable can't be repeatable.
|
|
117
|
+
const newModel =
|
|
118
|
+
model?.type === "Link" && model.config
|
|
119
|
+
? {
|
|
120
|
+
...model,
|
|
121
|
+
config: { ...model.config, repeat: false },
|
|
122
|
+
}
|
|
123
|
+
: model
|
|
120
124
|
|
|
121
125
|
const transformedField = transform({
|
|
122
126
|
path: itemPath,
|
|
123
127
|
key: key,
|
|
124
128
|
apiId: apiId,
|
|
125
|
-
model:
|
|
129
|
+
model: newModel,
|
|
126
130
|
content: fieldContent,
|
|
127
131
|
})
|
|
128
132
|
|