Skip to content

Commit

Permalink
fix handled the case when master locale is present along with other l…
Browse files Browse the repository at this point in the history
…ocales
  • Loading branch information
cs-raj committed Jul 8, 2024
1 parent f5cde1e commit b5fb984
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 63 deletions.
116 changes: 58 additions & 58 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions packages/contentstack-import/src/import/modules/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -958,13 +958,11 @@ export default class EntriesImport extends BaseClass {
requestObject.environments.push(this.envs[pubObject.environment].name);
}
if (pubObject.locale && indexOf(requestObject.locales, pubObject.locale) === -1) {
if (pubObject.locale === entry.locale) {
requestObject.locales.push(pubObject.locale);
}
requestObject.locales.push(pubObject.locale);
}
});
if (!requestObject.locales.length) {
apiOptions.apiData = null;
if (!requestObject.locales.includes(entry.locale)) {
apiOptions.apiData = null;
return apiOptions;
}
} else {
Expand Down

0 comments on commit b5fb984

Please sign in to comment.