From: Evan You Date: Mon, 20 Jan 2020 16:55:18 +0000 (-0500) Subject: fix(runtime-core): isSVG check should also apply for patch branch X-Git-Tag: v3.0.0-alpha.3~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=035b6560f7eb64ce940ed0d06e19086ad9a3890f;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): isSVG check should also apply for patch branch fix #639 --- diff --git a/packages/runtime-core/src/renderer.ts b/packages/runtime-core/src/renderer.ts index 8d79dfb786..e136caa4d5 100644 --- a/packages/runtime-core/src/renderer.ts +++ b/packages/runtime-core/src/renderer.ts @@ -341,6 +341,7 @@ export function createRenderer< isSVG: boolean, optimized: boolean ) { + isSVG = isSVG || (n2.type as string) === 'svg' if (n1 == null) { mountElement( n2, @@ -368,9 +369,7 @@ export function createRenderer< isSVG: boolean, optimized: boolean ) { - const tag = vnode.type as string - isSVG = isSVG || tag === 'svg' - const el = (vnode.el = hostCreateElement(tag, isSVG)) + const el = (vnode.el = hostCreateElement(vnode.type as string, isSVG)) const { props, shapeFlag, transition, scopeId } = vnode // props