0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

Merge pull request #1868 from 6eDesign/master

Small update to allow class directives to work in IE11
This commit is contained in:
Rich Harris 2018-12-07 20:30:22 -05:00 committed by GitHub
commit 811aa31909
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,5 +239,5 @@ export function addResizeListener(element, fn) {
}
export function toggleClass(element, name, toggle) {
element.classList.toggle(name, !!toggle);
element.classList[toggle ? 'add' : 'remove'](name);
}