Skip to content

Commit ef85636

Browse files
sto3pslyyx990803
authored andcommitted
switch
1 parent f0719c0 commit ef85636

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/runtime-core/src/renderer.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,13 @@ function baseCreateRenderer(
585585
slotScopeIds: string[] | null,
586586
optimized: boolean
587587
) => {
588-
if (n2.type === 'svg') {
589-
namespace = 'svg'
590-
}
591-
if ((n2.type as string) === 'math') {
592-
namespace = 'mathml'
588+
switch (n2.type) {
589+
case 'svg':
590+
namespace = 'svg'
591+
break
592+
case 'math':
593+
namespace = 'mathml'
594+
break
593595
}
594596

595597
if (n1 == null) {

0 commit comments

Comments
 (0)