mirror of https://github.com/sveltejs/svelte
Don't lose `class:` directive classes on an element with `{...spread}` attributes when updating (#3781)
* include all class: directive updates on elements with spreads (#3421) * add test * update changelogpull/3789/head
parent
8c0c15c3aa
commit
0419039d26
@ -0,0 +1,7 @@
|
||||
export default {
|
||||
html: `<div class='foo bar'>hello</div>`,
|
||||
test({ assert, component, target }) {
|
||||
component.blah = 'goodbye';
|
||||
assert.htmlEqual(target.innerHTML, `<div class='foo bar'>goodbye</div>`);
|
||||
}
|
||||
};
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
export let blah = 'hello';
|
||||
</script>
|
||||
|
||||
<div class='foo' class:bar={true} {...{}}>{blah}</div>
|
Loading…
Reference in new issue