From: Evan You Date: Sun, 26 Jan 2020 03:31:29 +0000 (-0500) Subject: fix(runtime-dom): should not access document in non-browser env X-Git-Tag: v3.0.0-alpha.4~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=48152bc88ea817ae23e2987dce99d64b426366c1;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-dom): should not access document in non-browser env fix #657 --- diff --git a/packages/runtime-dom/src/nodeOps.ts b/packages/runtime-dom/src/nodeOps.ts index 332e6654c4..291eecd05a 100644 --- a/packages/runtime-dom/src/nodeOps.ts +++ b/packages/runtime-dom/src/nodeOps.ts @@ -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 = {