Skip to content

Commit 48152bc

Browse files
committed
fix(runtime-dom): should not access document in non-browser env
fix #657
1 parent 963c71a commit 48152bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime-dom/src/nodeOps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const doc = document
1+
const doc = (typeof document !== 'undefined' ? document : null) as Document
22
const svgNS = 'http://www.w3.org/2000/svg'
33

44
export const nodeOps = {

0 commit comments

Comments
 (0)