mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
chore(node): upgrade to Node 20
This commit is contained in:
@@ -5,7 +5,7 @@ import _template from 'lodash/template';
|
||||
|
||||
import messages from '../errors/commonErrorMessages';
|
||||
|
||||
export default function errorMessage (msgKey, vars = {}) {
|
||||
function errorMessage (msgKey, vars = {}) {
|
||||
const message = messages[msgKey];
|
||||
if (!message) throw new Error(`Error processing the common message "${msgKey}".`);
|
||||
|
||||
@@ -14,3 +14,7 @@ export default function errorMessage (msgKey, vars = {}) {
|
||||
// TODO cache the result of template() ? More memory usage, faster output
|
||||
return _template(message)(clonedVars);
|
||||
}
|
||||
|
||||
export {
|
||||
errorMessage,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user