diff --git a/packages/runtime-core/src/devtools.ts b/packages/runtime-core/src/devtools.ts index 878bb68b..6bbd3db6 100644 --- a/packages/runtime-core/src/devtools.ts +++ b/packages/runtime-core/src/devtools.ts @@ -55,7 +55,10 @@ export function setDevtoolsHook(hook: DevtoolsHook, target: any) { // (#4815) // eslint-disable-next-line no-restricted-globals typeof window !== 'undefined' && - !navigator.userAgent.includes('jsdom') + // some envs mock window but not fully + window.HTMLElement && + // also exclude jsdom + !window.navigator?.userAgent?.includes('jsdom') ) { const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [])