Skip to content

Commit e509639

Browse files
authoredFeb 13, 2024··
fix(runtime-dom): should not trigger transition when v-show value is falsy (#10311)
1 parent 603a1e1 commit e509639

File tree

1 file changed

+5
-1
lines changed
  • packages/runtime-dom/src/directives

1 file changed

+5
-1
lines changed
 

‎packages/runtime-dom/src/directives/vShow.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ export const vShow: ObjectDirective<VShowElement> & { name?: 'show' } = {
2222
}
2323
},
2424
updated(el, { value, oldValue }, { transition }) {
25-
if (!value === !oldValue && el.style.display === el[vShowOldKey]) return
25+
if (
26+
!value === !oldValue &&
27+
(el.style.display === el[vShowOldKey] || !value)
28+
)
29+
return
2630
if (transition) {
2731
if (value) {
2832
transition.beforeEnter(el)

0 commit comments

Comments
 (0)
Please sign in to comment.