Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2016-12-13 01:31:22 +0300
committerClement Ho <ClemMakesApps@gmail.com>2017-01-10 01:01:21 +0300
commita30fbbddfb03a63305ff1bd273d7dd98c976936a (patch)
tree1285798af2c2dfbe23a7316f37d0125467d184e3 /app
parentf0935c4da5bcd84fac51f7a0d61ee0c8d8181679 (diff)
Reduce over-verboseness
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/filtered_search/filtered_search_manager.js.es66
1 files changed, 2 insertions, 4 deletions
diff --git a/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6 b/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
index a89627384e9..77a9de96c8a 100644
--- a/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
+++ b/app/assets/javascripts/filtered_search/filtered_search_manager.js.es6
@@ -47,13 +47,11 @@
const sanitizedKey = key.slice(0, key.indexOf('_'));
const valueHasSpace = sanitizedValue.indexOf(' ') !== -1;
const symbol = match.symbol;
-
- const preferredQuotations = '"';
- let quotationsToUse = preferredQuotations;
+ let quotationsToUse;
if (valueHasSpace) {
// Prefer ", but use ' if required
- quotationsToUse = sanitizedValue.indexOf(preferredQuotations) === -1 ? preferredQuotations : '\'';
+ quotationsToUse = sanitizedValue.indexOf('"') === -1 ? '"' : '\'';
}
inputValue += valueHasSpace ? `${sanitizedKey}:${symbol}${quotationsToUse}${sanitizedValue}${quotationsToUse}` : `${sanitizedKey}:${symbol}${sanitizedValue}`;