Skip to content

Commit

Permalink
fix(transition): correct pass argument into classList api
Browse files Browse the repository at this point in the history
close vuejs#638
  • Loading branch information
Coolyang1996 committed Jan 20, 2020
1 parent 1542b5e commit 160c607
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-dom/src/components/Transition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ export interface ElementWithTransition extends HTMLElement {
}

export function addTransitionClass(el: ElementWithTransition, cls: string) {
el.classList.add(cls)
el.classList.add(...cls.split(' '))
;(el._vtc || (el._vtc = new Set())).add(cls)
}

export function removeTransitionClass(el: ElementWithTransition, cls: string) {
el.classList.remove(cls)
el.classList.remove(...cls.split(' '))
if (el._vtc) {
el._vtc.delete(cls)
if (!el._vtc!.size) {
Expand Down

0 comments on commit 160c607

Please sign in to comment.