summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/locale
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2017-10-03 21:08:33 +0200
committerWinnie Hellmann <winnie@gitlab.com>2017-10-03 21:08:33 +0200
commitdae78a5598cd4890d1e922c5721e0e646cae9462 (patch)
tree039e35d162cb2f05d2c7331bc76cc7540f5402b8 /app/assets/javascripts/locale
parent244f631eb5c21bbf4f3dc3205139a98d91c97499 (diff)
downloadgitlab-ce-dae78a5598cd4890d1e922c5721e0e646cae9462.tar.gz
Fix linting errors in sprintf
Diffstat (limited to 'app/assets/javascripts/locale')
-rw-r--r--app/assets/javascripts/locale/sprintf.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/app/assets/javascripts/locale/sprintf.js b/app/assets/javascripts/locale/sprintf.js
index 003cbe820d6..5f4a053f98e 100644
--- a/app/assets/javascripts/locale/sprintf.js
+++ b/app/assets/javascripts/locale/sprintf.js
@@ -12,15 +12,15 @@ import _ from 'underscore';
@see https://gitlab.com/gitlab-org/gitlab-ce/issues/37992
**/
export default (input, parameters, escapeParameters = true) => {
- let output = input;
+ let output = input;
- if (parameters) {
- Object.keys(parameters).forEach((parameterName) => {
- const parameterValue = parameters[parameterName];
- const escapedParameterValue = escapeParameters ? _.escape(parameterValue) : parameterValue;
- output = output.replace(new RegExp(`%{${parameterName}}`, 'g'), escapedParameterValue);
- });
- }
+ if (parameters) {
+ Object.keys(parameters).forEach((parameterName) => {
+ const parameterValue = parameters[parameterName];
+ const escapedParameterValue = escapeParameters ? _.escape(parameterValue) : parameterValue;
+ output = output.replace(new RegExp(`%{${parameterName}}`, 'g'), escapedParameterValue);
+ });
+ }
- return output;
-}
+ return output;
+};