Skip to content

Commit 38d061d

Browse files
committed
fix: contentType title issue fixed
1 parent 4de234f commit 38d061d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

upload-api/migration-contentful/libs/createInitialMapper.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ const createInitialMapper = async () => {
107107
advanced:{ mandatory:true}
108108
}
109109
];
110-
const contentstackFields = [...uidTitle, ...contentTypeMapper(data)].filter(
110+
const dataArray = data.filter((item) => item.id!=='title' && item.id !== 'url');
111+
const contentstackFields = [...uidTitle, ...contentTypeMapper(dataArray)].filter(
111112
Boolean
112113
);
113114

upload-api/migration-contentful/libs/extractContentTypes.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ const saveContentType = (contentTypes, editorInterface, prefix) => {
7070
path.join(
7171
contentfulFolderPath,
7272
`${
73-
content.name.charAt(0).toUpperCase() +
74-
content.name.slice(1).replace(/[^\w\s]/g, "")
73+
(content.name.charAt(0).toUpperCase() + content.name.slice(1)).replace(/[^\w\s]/g, "")
7574
}.json`
7675
),
7776
JSON.stringify(jsonObj, null, 4)

0 commit comments

Comments
 (0)