]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): isSVG check should also apply for patch branch
authorEvan You <yyx990803@gmail.com>
Mon, 20 Jan 2020 16:55:18 +0000 (11:55 -0500)
committerEvan You <yyx990803@gmail.com>
Mon, 20 Jan 2020 16:55:18 +0000 (11:55 -0500)
fix #639

packages/runtime-core/src/renderer.ts

index 8d79dfb78670b7a8540d0683ff3521048edf03f9..e136caa4d5e327f1f026b59081c3322ea2dfe1ca 100644 (file)
@@ -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