Skip to content

Commit a4de664

Browse files
sto3pslsxzz
andauthored
Apply suggestions from code review
Co-authored-by: 三咲智子 Kevin Deng <[email protected]>
1 parent f5014e2 commit a4de664

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/runtime-core/src/compat/global.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ function installCompatMount(
505505

506506
let namespace: 'svg' | 'mathml' | undefined
507507
if (container instanceof SVGElement) namespace = 'svg'
508-
if (container instanceof MathMLElement) namespace = 'mathml'
508+
else if (container instanceof MathMLElement) namespace = 'mathml'
509509

510510
// HMR root reload
511511
if (__DEV__) {

packages/runtime-dom/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const createApp = ((...args) => {
102102
container.innerHTML = ''
103103
let namespace: 'svg' | 'mathml' | undefined
104104
if (container instanceof SVGElement) namespace = 'svg'
105-
if (container instanceof MathMLElement) namespace = 'mathml'
105+
else if (container instanceof MathMLElement) namespace = 'mathml'
106106
const proxy = mount(container, false, namespace)
107107
if (container instanceof Element) {
108108
container.removeAttribute('v-cloak')
@@ -128,7 +128,7 @@ export const createSSRApp = ((...args) => {
128128
if (container) {
129129
let namespace: 'svg' | 'mathml' | undefined
130130
if (container instanceof SVGElement) namespace = 'svg'
131-
if (container instanceof MathMLElement) namespace = 'mathml'
131+
else if (container instanceof MathMLElement) namespace = 'mathml'
132132
return mount(container, true, namespace)
133133
}
134134
}

0 commit comments

Comments
 (0)