Skip to content

Commit 4ba67c4

Browse files
Conduitrytaylorzane
authored andcommitted
don't treat $$-names as stores during invalidation (sveltejs#4453)
1 parent 32757ca commit 4ba67c4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
* Do not treat modifications to `$$props` as updates to a store called `$props` ([#4368](https://github.com/sveltejs/svelte/issues/4368))
56
* Deconflict `value` parameter name used in contextual bindings ([#4445](https://github.com/sveltejs/svelte/issues/4445))
67
* Fix dev mode validation of `{#each}` blocks using strings ([#4450](https://github.com/sveltejs/svelte/issues/4450))
78

src/compiler/compile/render_dom/invalidate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function invalidate(renderer: Renderer, scope: Scope, node: Node, names:
4343
if (node.type === 'AssignmentExpression' && node.operator === '=' && nodes_match(node.left, node.right) && tail.length === 0) {
4444
return get_invalidated(head, node);
4545
} else {
46-
const is_store_value = head.name[0] === '$';
46+
const is_store_value = head.name[0] === '$' && head.name[1] !== '$';
4747
const extra_args = tail.map(variable => get_invalidated(variable));
4848

4949
const pass_value = (

0 commit comments

Comments
 (0)