Skip to content

Commit ba8fdeb

Browse files
naiveeeegaozhao
and
gaozhao
authoredAug 20, 2024··
fix(kit): exposeInstanceToWindow work failed in no-browser env
Co-authored-by: gaozhao <zhaogao@tencent.com>
1 parent a1c3689 commit ba8fdeb

File tree

1 file changed

+2
-2
lines changed
  • packages/devtools-kit/src/core/vm

1 file changed

+2
-2
lines changed
 

Diff for: ‎packages/devtools-kit/src/core/vm/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ const $vmQueue: any[] = []
44
// Expose instance data to window
55
// Copied from https://github.com/vuejs/devtools/blob/f03590025b0b4910cf539531c91384be51a8f8fa/packages/app-backend-core/src/component.ts#L57-L72
66
export function exposeInstanceToWindow(componentInstance: any) {
7-
const win = window as any
8-
if (typeof win === 'undefined')
7+
if (typeof window === 'undefined')
98
return
9+
const win = window as any
1010

1111
if (!componentInstance)
1212
return

0 commit comments

Comments
 (0)
Please sign in to comment.