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
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-01-11 01:35:09 +0300
committerMike Greiling <mike@pixelcog.com>2017-01-19 02:15:27 +0300
commit9e4d04913ab9267d4a59df4d7feafd97b8117fe7 (patch)
tree35846b4ce22e0c5824f982bfbcc0e36281192a95 /app/assets/javascripts/extensions
parente7fdb1aae5a61b30f66ea3489d4e0759ed8ea3a1 (diff)
resolve all no-plusplus eslint violations
Diffstat (limited to 'app/assets/javascripts/extensions')
-rw-r--r--app/assets/javascripts/extensions/element.js.es66
1 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/extensions/element.js.es6 b/app/assets/javascripts/extensions/element.js.es6
index 3f12ad9ff9f..90ab79305a7 100644
--- a/app/assets/javascripts/extensions/element.js.es6
+++ b/app/assets/javascripts/extensions/element.js.es6
@@ -1,5 +1,5 @@
/* global Element */
-/* eslint-disable consistent-return, max-len, no-empty, no-plusplus, func-names */
+/* eslint-disable consistent-return, max-len, no-empty, func-names */
Element.prototype.closest = Element.prototype.closest || function closest(selector, selectedElement = this) {
if (!selectedElement) return;
@@ -14,7 +14,7 @@ Element.prototype.matches = Element.prototype.matches ||
Element.prototype.webkitMatchesSelector ||
function (s) {
const matches = (this.document || this.ownerDocument).querySelectorAll(s);
- let i = matches.length;
- while (--i >= 0 && matches.item(i) !== this) {}
+ let i = matches.length - 1;
+ while (i >= 0 && matches.item(i) !== this) { i -= 1; }
return i > -1;
};