Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
  • Loading branch information
sto3psl and sxzz authored Mar 6, 2023
1 parent f5014e2 commit a4de664
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/runtime-core/src/compat/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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__) {
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime-dom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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)
}
}
Expand Down

0 comments on commit a4de664

Please sign in to comment.