Skip to content

Commit e12f7a1

Browse files
committed
fix strapi
1 parent c65c4c6 commit e12f7a1

File tree

5 files changed

+5
-16
lines changed

5 files changed

+5
-16
lines changed

dist/strapi.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/strapi.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const l = (t) => {
2121
return null;
2222
if (Array.isArray(t))
2323
return {
24-
data: t.map(f)
24+
data: t.map(n)
2525
};
2626
let a = { ...t };
2727
return t.attributes && (a = {

dist/strapi/index.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@teleporthq/cms-mappers",
3-
"version": "1.0.11",
3+
"version": "1.0.12",
44
"main": "dist/index.js",
55
"module": "dist/contentful.mjs",
66
"types": "dist/contentful/index.d.ts",

src/strapi/index.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@ type Pagination = {
88
hasPrevPage?: boolean
99
}
1010

11-
type Meta = {
12-
pagination?: Pagination
13-
}
14-
15-
type ContentData = {
16-
id?: string
17-
attributes?: Record<string, unknown>
18-
data?: ContentData | ContentData[]
19-
meta?: Meta
20-
}
21-
2211
type NormalizedContent = {
2312
meta: {
2413
pagination?: Pagination
@@ -81,7 +70,7 @@ export const normalizeContent = (input: any): any => {
8170

8271
if (Array.isArray(input)) {
8372
return {
84-
data: input.map(normalize),
73+
data: input.map(normalizeContent),
8574
}
8675
}
8776

0 commit comments

Comments
 (0)