mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
start upgrading eslint
This commit is contained in:
@@ -6,10 +6,10 @@ import _template from 'lodash/template';
|
||||
import messages from '../../errors/commonErrorMessages';
|
||||
|
||||
export default function (msgKey, vars = {}) {
|
||||
let message = messages[msgKey];
|
||||
const message = messages[msgKey];
|
||||
if (!message) throw new Error(`Error processing the common message "${msgKey}".`);
|
||||
|
||||
let clonedVars = vars ? _clone(vars) : {};
|
||||
const clonedVars = vars ? _clone(vars) : {};
|
||||
|
||||
// TODO cache the result of template() ? More memory usage, faster output
|
||||
return _template(message)(clonedVars);
|
||||
|
||||
Reference in New Issue
Block a user