Skip to content

Commit

Permalink
Merge pull request #4 from punkave/hotfix/prototype
Browse files Browse the repository at this point in the history
Hotfix/prototype
  • Loading branch information
Alex Bea authored Sep 20, 2019
2 parents b861dd9 + 7d67867 commit 62eaff6
Show file tree
Hide file tree
Showing 3 changed files with 2,215 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export default {
if (el.closest) {
return el.closest(selector);
}
if (!el.prototype.matches) {
el.prototype.matches = el.prototype.msMatchesSelector ||
el.prototype.webkitMatchesSelector;
if (!Element.prototype.matches) {
Element.prototype.matches = Element.prototype.msMatchesSelector ||
Element.prototype.webkitMatchesSelector;
}
el.prototype.closest = function (s) {
Element.prototype.closest = function (s) {
let el = this;
if (!document.documentElement.contains(el)) return null;
do {
Expand Down
Loading

0 comments on commit 62eaff6

Please sign in to comment.