@prismicio/types-internal 3.2.0-alpha.3 → 3.2.0-alpha.5

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.
@@ -158,7 +158,6 @@ function traverseDocument({ document, customType, }) {
158
158
  { key, type: "Widget" },
159
159
  ]);
160
160
  const transformedWidget = (() => {
161
- var _a;
162
161
  switch (content.__TYPE__) {
163
162
  case "SliceContentType":
164
163
  return (0, fields_1.traverseSlices)({
@@ -182,9 +181,7 @@ function traverseDocument({ document, customType, }) {
182
181
  path,
183
182
  key,
184
183
  apiId: key,
185
- model: (fieldModel === null || fieldModel === void 0 ? void 0 : fieldModel.type) === "Link" && ((_a = fieldModel.config) === null || _a === void 0 ? void 0 : _a.repeat)
186
- ? fieldModel
187
- : undefined,
184
+ model: (fieldModel === null || fieldModel === void 0 ? void 0 : fieldModel.type) === "Link" ? fieldModel : undefined,
188
185
  content,
189
186
  })(transformWidget);
190
187
  default:
@@ -120,7 +120,6 @@ function traverseSharedSliceContent({ path, sliceKey, sliceName, model, content,
120
120
  var _a, _b;
121
121
  const fieldDef = (_b = (_a = model === null || model === void 0 ? void 0 : model.fields) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b[fieldKey];
122
122
  const transformedField = (() => {
123
- var _a;
124
123
  if ((0, GroupContent_1.isGroupContent)(fieldContent)) {
125
124
  return (0, GroupContent_1.traverseGroupContent)({
126
125
  path: path.concat([
@@ -142,9 +141,7 @@ function traverseSharedSliceContent({ path, sliceKey, sliceName, model, content,
142
141
  key: fieldKey,
143
142
  apiId: fieldKey,
144
143
  content: fieldContent,
145
- model: (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === "Link" && ((_a = fieldDef.config) === null || _a === void 0 ? void 0 : _a.repeat)
146
- ? fieldDef
147
- : undefined,
144
+ model: (fieldDef === null || fieldDef === void 0 ? void 0 : fieldDef.type) === "Link" ? fieldDef : undefined,
148
145
  })(transformWidget);
149
146
  }
150
147
  else if ((0, nestable_1.isNestableContent)(fieldContent)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismicio/types-internal",
3
- "version": "3.2.0-alpha.3",
3
+ "version": "3.2.0-alpha.5",
4
4
  "description": "Prismic types for Custom Types and Prismic Data",
5
5
  "keywords": [
6
6
  "typescript",
@@ -299,10 +299,7 @@ export function traverseDocument({
299
299
  path,
300
300
  key,
301
301
  apiId: key,
302
- model:
303
- fieldModel?.type === "Link" && fieldModel.config?.repeat
304
- ? fieldModel
305
- : undefined,
302
+ model: fieldModel?.type === "Link" ? fieldModel : undefined,
306
303
  content,
307
304
  })(transformWidget)
308
305
  default:
@@ -228,10 +228,7 @@ export function traverseSharedSliceContent({
228
228
  key: fieldKey,
229
229
  apiId: fieldKey,
230
230
  content: fieldContent,
231
- model:
232
- fieldDef?.type === "Link" && fieldDef.config?.repeat
233
- ? fieldDef
234
- : undefined,
231
+ model: fieldDef?.type === "Link" ? fieldDef : undefined,
235
232
  })(transformWidget)
236
233
  } else if (isNestableContent(fieldContent)) {
237
234
  return transformWidget({