summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/extensions/element.js.es6
diff options
context:
space:
mode:
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);
};