@prismicio/types-internal
Advanced tools
Comparing version 2.2.0-alpha.20 to 2.2.0-alpha.21
@@ -19,10 +19,17 @@ "use strict"; | ||
var _a; | ||
if (span.type === 'hyperlink') { | ||
const { __TYPE__, ...data } = ((_a = (0, Link_1.linkConverter)(span.data, assets)) === null || _a === void 0 ? void 0 : _a.value) || {}; | ||
return { | ||
type: span.type, | ||
start: span.start, | ||
end: span.end, | ||
data: data | ||
}; | ||
} | ||
return { | ||
type: span.type, | ||
start: span.start, | ||
end: span.end, | ||
// Text blocks in Content format have for data the Link type and not the whole LinkContent object | ||
...span.type === "hyperlink" ? { data: (_a = (0, Link_1.linkConverter)(span.data, assets)) === null || _a === void 0 ? void 0 : _a.value } : {} | ||
end: span.end | ||
}; | ||
}); | ||
} |
{ | ||
"name": "@prismicio/types-internal", | ||
"version": "2.2.0-alpha.20", | ||
"version": "2.2.0-alpha.21", | ||
"description": "Prismic types for Custom Types and Prismic Data", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -19,10 +19,18 @@ import type { Asset } from "../../../../../common" | ||
return spans.map(span => { | ||
if (span.type === 'hyperlink') { | ||
const { __TYPE__, ...data } = linkConverter(span.data, assets)?.value || {} | ||
return { | ||
type: span.type, | ||
start: span.start, | ||
end: span.end, | ||
data: data | ||
} | ||
} | ||
return { | ||
type: span.type, | ||
start: span.start, | ||
end: span.end, | ||
// Text blocks in Content format have for data the Link type and not the whole LinkContent object | ||
...span.type === "hyperlink" ? { data: linkConverter(span.data, assets)?.value } : {} | ||
end: span.end | ||
} | ||
}) | ||
} |
2568115
61815