Skip to content

Commit 1354a62

Browse files
committed
fix: review feedback
1 parent d54f6c8 commit 1354a62

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

packages/runtime-core/src/renderer.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -621,10 +621,13 @@ function baseCreateRenderer(
621621
optimized,
622622
)
623623
} else {
624-
if (n1.el && (n1.el as VueElement)._isVueCE) {
625-
;(n1.el as VueElement)._beginPatch()
626-
}
624+
const customElement = !!(n1.el && (n1.el as VueElement)._isVueCE)
625+
? (n1.el as VueElement)
626+
: null
627627
try {
628+
if (customElement) {
629+
customElement._beginPatch()
630+
}
628631
patchElement(
629632
n1,
630633
n2,
@@ -635,8 +638,8 @@ function baseCreateRenderer(
635638
optimized,
636639
)
637640
} finally {
638-
if (n1.el && (n1.el as VueElement)._isVueCE) {
639-
;(n1.el as VueElement)._endPatch()
641+
if (customElement) {
642+
customElement._endPatch()
640643
}
641644
}
642645
}

0 commit comments

Comments
 (0)