Skip to content

Commit

Permalink
fix for empty lang value
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Aug 9, 2024
1 parent 7c2436f commit debab95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/nexrender-core/src/tasks/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -361,4 +362,3 @@ Estimated date of change to the new behavior: 2023-06-01.\n`);
}
})
};

0 comments on commit debab95

Please sign in to comment.