We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5d901df + 30765fe commit f96f45aCopy full SHA for f96f45a
can-component.js
@@ -490,7 +490,7 @@ var Component = Construct.extend(
490
var removalDisposal = domMutate.onNodeRemoval(el, function () {
491
var doc = el.ownerDocument;
492
var rootNode = doc.contains ? doc : doc.documentElement;
493
- if (!rootNode.contains(el)) {
+ if (!rootNode || !rootNode.contains(el)) {
494
removalDisposal();
495
callTeardownFunctions();
496
}
0 commit comments