diff options
author | Mark Florian <mflorian@gitlab.com> | 2019-05-17 06:29:38 +0300 |
---|---|---|
committer | Mark Florian <mflorian@gitlab.com> | 2019-05-17 06:29:40 +0300 |
commit | 50910d501f14169f4860ffcc0979e262bb76b8f8 (patch) | |
tree | f19be63a7e7b80586763a1d707553d037208e301 /app/assets/javascripts/locale | |
parent | e9ed028472747422670fed448624bb3e067fb4e2 (diff) |
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.
Diffstat (limited to 'app/assets/javascripts/locale')
-rw-r--r-- | app/assets/javascripts/locale/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/locale/index.js b/app/assets/javascripts/locale/index.js index 1ae3362c4bc..41aa0f4ddb9 100644 --- a/app/assets/javascripts/locale/index.js +++ b/app/assets/javascripts/locale/index.js @@ -11,7 +11,7 @@ delete window.translations; @param text The text to be translated @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 |