From 3a510f252fb301d58dae49dce99f09aae153a8dd Mon Sep 17 00:00:00 2001 From: Aman Kumar Date: Tue, 27 Feb 2024 12:14:38 +0530 Subject: [PATCH] fix: handle module not found error in migration error helper --- packages/contentstack-migration/src/utils/error-helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contentstack-migration/src/utils/error-helper.js b/packages/contentstack-migration/src/utils/error-helper.js index 86184b0c03..f1048eb743 100644 --- a/packages/contentstack-migration/src/utils/error-helper.js +++ b/packages/contentstack-migration/src/utils/error-helper.js @@ -51,7 +51,7 @@ module.exports = (errors) => { messages.push(`${fileErrorsMessage}${errorMessages}`); } - if (isEmpty(messages) && errors?.length) { + if (isEmpty(messages) && errors !== undefined && isEmpty(errorsByFile)) { console.error('Migration error---', errors); } else { console.log(messages.join('\n'));