Skip to content

Commit

Permalink
Merge pull request #1402 from contentstack/bugfix/DX-552
Browse files Browse the repository at this point in the history
DX - 552 - used the length property to validate the missing mandatory fields, avoiding removal of all the entries
  • Loading branch information
cs-raj authored May 7, 2024
2 parents f20c73d + 3337c1c commit 0d0da65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/contentstack-audit/src/modules/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default class Entries {

const fields = this.missingMandatoryFields[uid];
const isPublished = entry.publish_details.length > 0;
if ((this.fix && fields && isPublished) || (!this.fix && fields)) {
if ((this.fix && fields.length && isPublished) || (!this.fix && fields)) {
const fixStatus = this.fix ? 'Fixed' : '';
fields?.forEach((field: { isPublished: boolean; fixStatus?: string }) => {
field.isPublished = isPublished;
Expand Down

0 comments on commit 0d0da65

Please sign in to comment.