From 71e890444899dad38c7ef7842406a1689ff36195 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Wed, 19 Jun 2024 10:55:26 -0700 Subject: [PATCH] Always return the message object for consistent return value. --- packages/kolibri-tools/lib/i18n/astUtils.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/kolibri-tools/lib/i18n/astUtils.js b/packages/kolibri-tools/lib/i18n/astUtils.js index 2165821af8b..05525008fb8 100644 --- a/packages/kolibri-tools/lib/i18n/astUtils.js +++ b/packages/kolibri-tools/lib/i18n/astUtils.js @@ -636,13 +636,12 @@ function getMessagesFromFile(filePath, verbose = false) { logging.info(`Extracted ${Object.keys(messages).length} messages from :: ${filePath}`); logging.info(JSON.stringify(messages)); } - return messages; } catch (_) { logging.error( `Tried to find parsable Javascript in ${filePath} but could not. Will skip the file for now. This is a problem if you are expecting to translate any messages in that file - otherwise - you may ignore this message.`, ); - return; } + return messages; } module.exports = {