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:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2016-11-23 17:56:28 +0300
committerLuke "Jared" Bennett <lbennett@gitlab.com>2016-11-23 17:56:28 +0300
commit6892293e730b98d324b5d92663349e9ee42a70a9 (patch)
treed4da9714d9ad8c9d338946aa193f23fd5cde84df /app/assets/javascripts/extensions/element.js.es6
parent3e0c6142d120538476019c877cf265c9a7f08c74 (diff)
Use default `closest` if available!
Diffstat (limited to 'app/assets/javascripts/extensions/element.js.es6')
-rw-r--r--app/assets/javascripts/extensions/element.js.es62
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/extensions/element.js.es6 b/app/assets/javascripts/extensions/element.js.es6
index afb2f0d6956..6d9b0c4bc3e 100644
--- a/app/assets/javascripts/extensions/element.js.es6
+++ b/app/assets/javascripts/extensions/element.js.es6
@@ -3,7 +3,7 @@
Element.prototype.matches = Element.prototype.matches || Element.prototype.msMatchesSelector;
-Element.prototype.closest = function closest(selector, selectedElement = this) {
+Element.prototype.closest = Element.prototype.closest || function closest(selector, selectedElement = this) {
if (!selectedElement) return;
return selectedElement.matches(selector) ? selectedElement : Element.prototype.closest(selector, selectedElement.parentElement);
};