Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(transition): correct pass argument into classList api (#638) #645

Merged
merged 3 commits into from
Jan 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(' '))
yyyanghj marked this conversation as resolved.
Show resolved Hide resolved
;(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