From fb8cb5d487605d397e6e676a286674d1f8f02af6 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 23 Feb 2020 18:19:06 -0500 Subject: [PATCH] don't treat $$-names as stores during invalidation (#4453) --- CHANGELOG.md | 1 + src/compiler/compile/render_dom/invalidate.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2166ca4c9c..d3687b3d2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +* Do not treat modifications to `$$props` as updates to a store called `$props` ([#4368](https://github.com/sveltejs/svelte/issues/4368)) * Deconflict `value` parameter name used in contextual bindings ([#4445](https://github.com/sveltejs/svelte/issues/4445)) * Fix dev mode validation of `{#each}` blocks using strings ([#4450](https://github.com/sveltejs/svelte/issues/4450)) diff --git a/src/compiler/compile/render_dom/invalidate.ts b/src/compiler/compile/render_dom/invalidate.ts index 20aff05d1e..28e4f37e3f 100644 --- a/src/compiler/compile/render_dom/invalidate.ts +++ b/src/compiler/compile/render_dom/invalidate.ts @@ -43,7 +43,7 @@ export function invalidate(renderer: Renderer, scope: Scope, node: Node, names: if (node.type === 'AssignmentExpression' && node.operator === '=' && nodes_match(node.left, node.right) && tail.length === 0) { return get_invalidated(head, node); } else { - const is_store_value = head.name[0] === '$'; + const is_store_value = head.name[0] === '$' && head.name[1] !== '$'; const extra_args = tail.map(variable => get_invalidated(variable)); const pass_value = (