Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #372 from B77Mills/i18nFunctionCheckFix
Browse files Browse the repository at this point in the history
Return the function vs isFn check in i18n middleware
  • Loading branch information
solocommand authored Jul 11, 2022
2 parents b40807a + 811cba1 commit 69ed5dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/marko-web-theme-monorail/middleware/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ const isFn = f => typeof f === 'function';
*/
module.exports = (app, fn) => {
const defaultFn = v => v;
const i18n = isFn(fn) || defaultFn;
const i18n = isFn(fn) ? fn : defaultFn;
set(app.locals, 'i18n', i18n);
};

0 comments on commit 69ed5dd

Please sign in to comment.