@prismicio/types-internal 2.1.0-alpha.2 → 2.1.0-alpha.3
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/content/Document.js
CHANGED
|
@@ -62,12 +62,7 @@ function extractMetadata(data) {
|
|
|
62
62
|
widgets: {},
|
|
63
63
|
});
|
|
64
64
|
const slugs = data["slugs_INTERNAL"] || [];
|
|
65
|
-
const uid =
|
|
66
|
-
const rawUID = data["uid"];
|
|
67
|
-
if ((0, fields_1.isUIDContent)(rawUID))
|
|
68
|
-
return rawUID.value;
|
|
69
|
-
return;
|
|
70
|
-
})();
|
|
65
|
+
const uid = data["uid"];
|
|
71
66
|
return {
|
|
72
67
|
widgets,
|
|
73
68
|
types,
|
package/package.json
CHANGED
package/src/content/Document.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { pipe } from "fp-ts/lib/function"
|
|
|
4
4
|
import * as t from "io-ts"
|
|
5
5
|
|
|
6
6
|
import { WidgetKey } from "../common"
|
|
7
|
-
import {
|
|
7
|
+
import { WidgetContent, WidgetLegacy } from "./fields"
|
|
8
8
|
import {
|
|
9
9
|
defaultCtx,
|
|
10
10
|
FieldOrSliceType,
|
|
@@ -97,11 +97,7 @@ function extractMetadata(data: { [p: string]: unknown }): {
|
|
|
97
97
|
)
|
|
98
98
|
|
|
99
99
|
const slugs = (data["slugs_INTERNAL"] as string[]) || []
|
|
100
|
-
const uid =
|
|
101
|
-
const rawUID = data["uid"]
|
|
102
|
-
if (isUIDContent(rawUID)) return rawUID.value
|
|
103
|
-
return
|
|
104
|
-
})()
|
|
100
|
+
const uid = data["uid"] as string | undefined
|
|
105
101
|
|
|
106
102
|
return {
|
|
107
103
|
widgets,
|