diff --git a/src/baseWrapper.ts b/src/baseWrapper.ts index aca052172b..0532c6b1b9 100644 --- a/src/baseWrapper.ts +++ b/src/baseWrapper.ts @@ -248,7 +248,14 @@ export default abstract class BaseWrapper } exists() { - return !this.getCurrentComponent()?.isUnmounted + const currentComponent = this.getCurrentComponent() + + if (!currentComponent) { + // DOM Node always exists + return true + } + + return currentComponent.isUnmounted } get(