From 644f539f96cc0ca1e6a7d7d625b306038d031366 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Wed, 24 Apr 2024 16:09:24 +0530 Subject: [PATCH] fix when entry does not have title or title is empty --- packages/contentstack-audit/src/modules/entries.ts | 6 +++--- packages/contentstack-utilities/src/helpers.ts | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/contentstack-audit/src/modules/entries.ts b/packages/contentstack-audit/src/modules/entries.ts index 8f32c4c165..75affa8be8 100644 --- a/packages/contentstack-audit/src/modules/entries.ts +++ b/packages/contentstack-audit/src/modules/entries.ts @@ -1000,8 +1000,8 @@ export default class Entries { } } } - if (this.isEntryWithoutTitleField) { - throw Error(`Entries found with missing 'title' field! Please make the data corrections and re-run the audit.`); - } + // if (this.isEntryWithoutTitleField) { + // throw Error(`Entries found with missing 'title' field! Please make the data corrections and re-run the audit.`); + // } } } diff --git a/packages/contentstack-utilities/src/helpers.ts b/packages/contentstack-utilities/src/helpers.ts index 6270ca906f..144770fe9a 100644 --- a/packages/contentstack-utilities/src/helpers.ts +++ b/packages/contentstack-utilities/src/helpers.ts @@ -37,7 +37,6 @@ export const createDeveloperHubUrl = (developerHubBaseUrl: string): string => { return developerHubBaseUrl.startsWith('http') ? developerHubBaseUrl : `https://${developerHubBaseUrl}`; }; - export const validatePath = (input: string) => { const pattern = /[*$%#<>{}!&?]/g; if (pattern.test(input)) { @@ -53,5 +52,4 @@ export const validatePath = (input: string) => { }; // To escape special characters in a string -export const escapeRegExp = (str: string) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - +export const escapeRegExp = (str: string) => str?.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');