Skip to content

Commit 035b656

Browse files
committed
fix(runtime-core): isSVG check should also apply for patch branch
fix #639
1 parent e81c8a3 commit 035b656

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/runtime-core/src/renderer.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ export function createRenderer<
341341
isSVG: boolean,
342342
optimized: boolean
343343
) {
344+
isSVG = isSVG || (n2.type as string) === 'svg'
344345
if (n1 == null) {
345346
mountElement(
346347
n2,
@@ -368,9 +369,7 @@ export function createRenderer<
368369
isSVG: boolean,
369370
optimized: boolean
370371
) {
371-
const tag = vnode.type as string
372-
isSVG = isSVG || tag === 'svg'
373-
const el = (vnode.el = hostCreateElement(tag, isSVG))
372+
const el = (vnode.el = hostCreateElement(vnode.type as string, isSVG))
374373
const { props, shapeFlag, transition, scopeId } = vnode
375374

376375
// props

0 commit comments

Comments
 (0)