diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-11-23 14:56:28 +0000 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2016-11-23 14:56:28 +0000 |
commit | 6892293e730b98d324b5d92663349e9ee42a70a9 (patch) | |
tree | d4da9714d9ad8c9d338946aa193f23fd5cde84df /app | |
parent | 3e0c6142d120538476019c877cf265c9a7f08c74 (diff) | |
download | gitlab-ce-6892293e730b98d324b5d92663349e9ee42a70a9.tar.gz |
Use default `closest` if available!use-default-closest-if-available
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/extensions/element.js.es6 | 2 |
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); }; |