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.
1 parent 5d901df commit 30765feCopy full SHA for 30765fe
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