From debab958f4b4bffaaeabde21e9f16b3a166e76b2 Mon Sep 17 00:00:00 2001 From: Vladyslav Hrytsenko Date: Fri, 9 Aug 2024 19:03:23 +0300 Subject: [PATCH] fix for empty lang value --- packages/nexrender-core/src/tasks/render.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nexrender-core/src/tasks/render.js b/packages/nexrender-core/src/tasks/render.js index f0355574..4978d807 100644 --- a/packages/nexrender-core/src/tasks/render.js +++ b/packages/nexrender-core/src/tasks/render.js @@ -33,8 +33,9 @@ const seconds = (string) => string.split(':') module.exports = (job, settings) => { settings.logger.log(`[${job.uid}] rendering job...`); - if(!settings.language) { - settings.lang = "en" + if (!settings.language || !translations.hasOwnProperty(settings.language)) { + settings.language = "en"; + settings.logger.log(`[${job.uid}] AE language not set, defaulting to "en"`); } const progressRegex = /([\d]{1,2}:[\d]{2}:[\d]{2}:[\d]{2})\s+(\(\d+[UL]?\))/gi; @@ -361,4 +362,3 @@ Estimated date of change to the new behavior: 2023-06-01.\n`); } }) }; -