mirror of https://github.com/sveltejs/svelte
make autosubscribing to a nullish store a no-op (#4304)
* make autosubscribing to a nullish store a no-op (#2181) * update changelog * add testpull/4316/head
parent
fd9b23e5e4
commit
f01bb639be
@ -0,0 +1,13 @@
|
||||
import { writable } from '../../../../store';
|
||||
|
||||
export default {
|
||||
html: `
|
||||
<p>undefined</p>
|
||||
`,
|
||||
async test({ assert, component, target }) {
|
||||
component.store = writable('foo');
|
||||
assert.htmlEqual(target.innerHTML, `
|
||||
<p>foo</p>
|
||||
`);
|
||||
}
|
||||
};
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
export let store;
|
||||
</script>
|
||||
|
||||
<p>{$store}</p>
|
Loading…
Reference in new issue