Skip to content

Commit 31a77d0

Browse files
committed
Merge pull request #275 from davidmaxwaterman/master
Return false if element is null to handle webcomponentsjs polyfill.
2 parents 1087ddd + 395f430 commit 31a77d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mousetrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@
410410
}
411411

412412
function _belongsTo(element, ancestor) {
413-
if (element === document) {
413+
if (element === null || element === document) {
414414
return false;
415415
}
416416

0 commit comments

Comments
 (0)