Bugfix lib render when options is null default to global locale

indiachan-spamvector
Thomas Lynch 1 year ago
parent ee1df21003
commit 7525308504
  1. 2
      lib/build/render.js

@ -58,7 +58,7 @@ module.exports = async (htmlName=null, templateName=null, options=null, json=nul
...renderLocals,
};
//NOTE: will this cause issues with global locale?
if (options.board && options.board.settings) {
if (options && options.board && options.board.settings) {
renderLocals.setLocale(renderLocals, options.board.settings.language);
} else {
renderLocals.setLocale(renderLocals, language);

Loading…
Cancel
Save