diff --git a/packages/runtime-core/src/compat/global.ts b/packages/runtime-core/src/compat/global.ts index b50f513ea28..c3d4a475fa5 100644 --- a/packages/runtime-core/src/compat/global.ts +++ b/packages/runtime-core/src/compat/global.ts @@ -505,7 +505,7 @@ function installCompatMount( let namespace: 'svg' | 'mathml' | undefined if (container instanceof SVGElement) namespace = 'svg' - if (container instanceof MathMLElement) namespace = 'mathml' + else if (container instanceof MathMLElement) namespace = 'mathml' // HMR root reload if (__DEV__) { diff --git a/packages/runtime-dom/src/index.ts b/packages/runtime-dom/src/index.ts index b2e3e7bebff..1f9773551df 100644 --- a/packages/runtime-dom/src/index.ts +++ b/packages/runtime-dom/src/index.ts @@ -102,7 +102,7 @@ export const createApp = ((...args) => { container.innerHTML = '' let namespace: 'svg' | 'mathml' | undefined if (container instanceof SVGElement) namespace = 'svg' - if (container instanceof MathMLElement) namespace = 'mathml' + else if (container instanceof MathMLElement) namespace = 'mathml' const proxy = mount(container, false, namespace) if (container instanceof Element) { container.removeAttribute('v-cloak') @@ -128,7 +128,7 @@ export const createSSRApp = ((...args) => { if (container) { let namespace: 'svg' | 'mathml' | undefined if (container instanceof SVGElement) namespace = 'svg' - if (container instanceof MathMLElement) namespace = 'mathml' + else if (container instanceof MathMLElement) namespace = 'mathml' return mount(container, true, namespace) } }