Skip to content

Commit 1c0effa

Browse files
committed
skip v-show transition if value is the same (fix #3395)
1 parent c2c68d6 commit 1c0effa

File tree

1 file changed

+2
-1
lines changed
  • src/platforms/web/runtime/directives

1 file changed

+2
-1
lines changed

src/platforms/web/runtime/directives/show.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export default {
1919
}
2020
el.style.display = value ? '' : 'none'
2121
},
22-
update (el: HTMLElement, { value }: VNodeDirective, vnode: VNodeWithData) {
22+
update (el: HTMLElement, { value, oldValue }: VNodeDirective, vnode: VNodeWithData) {
23+
if (value === oldValue) return
2324
vnode = locateNode(vnode)
2425
const transition = vnode.data && vnode.data.transition
2526
if (transition && !isIE9) {

0 commit comments

Comments
 (0)