fix `bind:this` binding to a store (#3591)

pull/3751/head
Conduitry 5 years ago committed by GitHub
parent 2e2b0c9175
commit 8d7d0ff7dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,6 +7,7 @@
* Allow exiting a reactive block early with `break $` ([#2828](https://github.com/sveltejs/svelte/issues/2828))
* Check attributes have changed before setting them to avoid image flicker ([#3579](https://github.com/sveltejs/svelte/pull/3579))
* Fix generating malformed code for `{@debug}` tags with no dependencies ([#3588](https://github.com/sveltejs/svelte/issue/3588))
* Fix `bind:this` binding to a store ([#3591](https://github.com/sveltejs/svelte/issue/3591))
* Use safer `HTMLElement` check before extending class ([#3608](https://github.com/sveltejs/svelte/issue/3608))
* Add `location` as a known global ([#3619](https://github.com/sveltejs/svelte/pull/3619))
* Support `{#await}` with `{:catch}` but no `{:then}` ([#3623](https://github.com/sveltejs/svelte/issues/3623))

@ -764,7 +764,7 @@ export default class Component {
}
if (name[0] === '$' && name[1] !== '$') {
return x`${name.slice(1)}.set(${name})`;
return x`${name.slice(1)}.set(${value || name})`;
}
if (

@ -0,0 +1,4 @@
export default {
skip_if_ssr: true,
html: `<div>object</div>`
};

@ -0,0 +1,6 @@
<script>
import { writable } from 'svelte/store';
const foo = writable();
</script>
<div bind:this={$foo}>{typeof $foo}</div>
Loading…
Cancel
Save