-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not treat reassigned synthetic binds as state in runes mode (#…
…14236) * fix: do not treat reassigned synthetic binds as state in runes mode * fix: avoid calling checks if we are in runes mode
- Loading branch information
1 parent
d207666
commit 7bc94b9
Showing
4 changed files
with
48 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
fix: do not treat reassigned synthetic binds as state in runes mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/svelte/tests/runtime-runes/samples/reassigned-store-not-state/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { test } from '../../test'; | ||
|
||
export default test({ | ||
async test({ logs, assert }) { | ||
assert.deepEqual(logs, ['world']); | ||
} | ||
}); |
13 changes: 13 additions & 0 deletions
13
packages/svelte/tests/runtime-runes/samples/reassigned-store-not-state/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script> | ||
import { writable } from 'svelte/store'; | ||
let style = writable('world'); | ||
$effect(() => { | ||
console.log($style); | ||
}); | ||
function init(){ | ||
style = writable('svelte'); | ||
} | ||
</script> |