diff --git a/packages/core/src/runtime/actor.ts b/packages/core/src/runtime/actor.ts index bc2b4c8..f459c16 100644 --- a/packages/core/src/runtime/actor.ts +++ b/packages/core/src/runtime/actor.ts @@ -164,7 +164,14 @@ export class Facet { } isInert(): boolean { - return this.children.size === 0 && this.outbound.size === 0 && this.inertCheckPreventers === 0; + const noKids = this.children.size === 0; + const noOutboundHandles = this.outbound.size === 0; + // The only outbound handle the root facet of an actor may have is a link + // assertion, from _halfLink(). This is not to be considered a "real" + // assertion for purposes of keeping the facet alive! + const isRootFacet = this.parent === null; + const noInertCheckPreventers = this.inertCheckPreventers === 0; + return noKids && (noOutboundHandles || isRootFacet) && noInertCheckPreventers; } preventInertCheck(): () => void {