]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-dom): should not access document in non-browser env
authorEvan You <yyx990803@gmail.com>
Sun, 26 Jan 2020 03:31:29 +0000 (22:31 -0500)
committerEvan You <yyx990803@gmail.com>
Sun, 26 Jan 2020 03:31:38 +0000 (22:31 -0500)
fix #657

packages/runtime-dom/src/nodeOps.ts

index 332e6654c45aeed87520570e4d96db24d03a3ec3..291eecd05a5b41488df9b947200ef10e78321c54 100644 (file)
@@ -1,4 +1,4 @@
-const doc = document
+const doc = (typeof document !== 'undefined' ? document : null) as Document
 const svgNS = 'http://www.w3.org/2000/svg'
 
 export const nodeOps = {