diff --git a/CHANGELOG.md b/CHANGELOG.md index 9258e5a3b6..05de113ee2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ * Initialize stylesheet with `/* empty */` to enable setting CSP directive that also works in Safari ([#7800](https://github.com/sveltejs/svelte/pull/7800)) * Treat slots as if they don't exist when using CSS adjacent and general sibling combinators ([#8284](https://github.com/sveltejs/svelte/issues/8284)) * Fix transitions so that they don't require a `style-src 'unsafe-inline'` Content Security Policy (CSP) ([#6662](https://github.com/sveltejs/svelte/issues/6662)). +* Explicitly disallow `var` declarations extending the reactive statement scope ([#6800](https://github.com/sveltejs/svelte/pull/6800)) ## Unreleased (3.0) diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts index 469dbf9d13..f6ef17f641 100644 --- a/src/compiler/compile/Component.ts +++ b/src/compiler/compile/Component.ts @@ -1356,7 +1356,7 @@ export default class Component { const module_dependencies = new Set(); let scope = this.instance_scope; - const {declarations: outset_scope_decalarations} = this.instance_scope; + const { declarations: outset_scope_decalarations } = this.instance_scope; const map = this.instance_scope_map; walk(node.body, {