mirror of https://github.com/sveltejs/svelte
fix: improve event delegation handler hoisting (#9929)
* fix: improve event delegation handler hoisting * fixespull/9922/head
parent
59c7487f36
commit
b8f3c49e5f
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: improve event delegation handler hoisting
|
@ -0,0 +1,7 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
compileOptions: { dev: true }, // tests `@validate_store` code generation
|
||||||
|
|
||||||
|
html: `<button>clicks:\n0</button>`
|
||||||
|
});
|
@ -0,0 +1,12 @@
|
|||||||
|
<script>
|
||||||
|
import {writable} from 'svelte/store'
|
||||||
|
let store = writable(0)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<button onclick={() => {
|
||||||
|
if(store && $store){
|
||||||
|
|
||||||
|
}
|
||||||
|
}}>
|
||||||
|
clicks: {$store}
|
||||||
|
</button>
|
Loading…
Reference in new issue