Skip to content

Commit

Permalink
fix(runtime-core): isSVG check should also apply for patch branch
Browse files Browse the repository at this point in the history
fix #639
  • Loading branch information
yyx990803 committed Jan 20, 2020
1 parent e81c8a3 commit 035b656
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ export function createRenderer<
isSVG: boolean,
optimized: boolean
) {
isSVG = isSVG || (n2.type as string) === 'svg'
if (n1 == null) {
mountElement(
n2,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 035b656

Please sign in to comment.