mirror of https://github.com/sveltejs/svelte
fix: allow binding to const with spread in legacy mode (#13849)
parent
4fbd2a6f10
commit
04c38b089f
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: allow binding to const with spread in legacy mode
|
@ -0,0 +1,3 @@
|
|||||||
|
<script>
|
||||||
|
export const x = 42;
|
||||||
|
</script>
|
@ -0,0 +1,9 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
html: `<p>42</p>`,
|
||||||
|
async test({ target, assert }) {
|
||||||
|
const p = target.querySelector('p');
|
||||||
|
assert.equal(p?.innerHTML, '42');
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,11 @@
|
|||||||
|
<script>
|
||||||
|
import Test from "./Test.svelte";
|
||||||
|
|
||||||
|
let x;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Test
|
||||||
|
bind:x
|
||||||
|
{...{}}
|
||||||
|
/>
|
||||||
|
<p>{x}</p>
|
Loading…
Reference in new issue