mirror of https://github.com/sveltejs/svelte
before this, an empty, uninitialized store would emit an `undefined`
value, even before any value is set. this is quite unexpected and not
the same behaviour as rxjs (for example).
you can still explicitly create a store with undefined with
`writeable(undefined)` or `readable(undefined)`
Previously:
```
> var store = require('./store');
> var w = store.writable();
> w.subscribe(v=>console.log('v:', v));
v: undefined
```
After this commit:
```
> var store = require('./store');
> var w = store.writable();
> w.subscribe(v=>console.log('v:', v));
> w.set('test');
v: test
```
pull/7075/head
parent
6f2ebaa76d
commit
691944e9f8
Loading…
Reference in new issue