mirror of https://github.com/sveltejs/svelte
parent
5497b3d0bc
commit
05c3efafb4
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: wrap props in deriveds more conservatively in legacy mode
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<svelte:options accessors={false} />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export let x;
|
||||||
|
|
||||||
|
$: console.log('x', x);
|
||||||
|
</script>
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
import { flushSync } from 'svelte';
|
||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
test({ assert, logs, target }) {
|
||||||
|
assert.deepEqual(logs, ['x', 42]);
|
||||||
|
|
||||||
|
const btn = target.querySelector('button');
|
||||||
|
flushSync(() => btn?.click());
|
||||||
|
|
||||||
|
assert.deepEqual(logs, ['x', 42]);
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<script>
|
||||||
|
import Child from './Child.svelte';
|
||||||
|
|
||||||
|
let object = { x: 42 };
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<button on:click={() => object = { x: 42 }}>update</button>
|
||||||
|
|
||||||
|
<Child x={object.x} />
|
||||||
Loading…
Reference in new issue