Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
[Contentful] importer fix (#142)
Browse files Browse the repository at this point in the history
* [Contentful] importer fix

Contentful allows for numbers at the start of models.

* Fix for multiple digit numbers at the start
  • Loading branch information
marcelofinamorvieira authored Mar 25, 2022
1 parent ef4977e commit b7a5d74
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/contentfulImport/createModels.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Progress from './progress';
export const toItemTypeApiKey = value => {
return `${decamelize(value)
.replace(/\W/g, '_')
.replace(/^\d+/g, '')
.replace(/^_/g, '')}_model`.replace(/_{2,}/g, '_');
};

Expand Down

0 comments on commit b7a5d74

Please sign in to comment.