Remove unnecessary bind call
This was creating, calling and throwing away a brand new bound function on every single call to `gettext`. This is wasteful, as the original function can be called directly in such a way that `this` is bound correctly.
This commit is contained in:
parent
e9ed028472
commit
50910d501f
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ delete window.translations;
|
||||||
@param text The text to be translated
|
@param text The text to be translated
|
||||||
@returns {String} The translated text
|
@returns {String} The translated text
|
||||||
*/
|
*/
|
||||||
const gettext = text => locale.gettext.bind(locale)(ensureSingleLine(text));
|
const gettext = text => locale.gettext(ensureSingleLine(text));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Translate the text with a number
|
Translate the text with a number
|
||||||
|
|
Loading…
Reference in a new issue