From 39ffa63f4c8c7632853a4554b4109c343cfaf04a Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Mon, 23 Dec 2024 23:39:11 +0000 Subject: [PATCH] lint --- .changeset/real-onions-confess.md | 2 +- packages/svelte/src/compiler/phases/3-transform/utils.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.changeset/real-onions-confess.md b/.changeset/real-onions-confess.md index 25193ace4e..06e07fd222 100644 --- a/.changeset/real-onions-confess.md +++ b/.changeset/real-onions-confess.md @@ -2,4 +2,4 @@ 'svelte': patch --- -fix: ensure logic blocks keep consitent namespacing +fix: ensure logic blocks keep consistent namespacing diff --git a/packages/svelte/src/compiler/phases/3-transform/utils.js b/packages/svelte/src/compiler/phases/3-transform/utils.js index bdf4baf038..fdb4c579be 100644 --- a/packages/svelte/src/compiler/phases/3-transform/utils.js +++ b/packages/svelte/src/compiler/phases/3-transform/utils.js @@ -350,7 +350,10 @@ export function infer_namespace(namespace, parent, nodes) { // If the parent block is a control block, we want to keep the namespace if it's not html if ( namespace !== 'html' && - (parent.type === 'EachBlock' || parent.type === 'AwaitBlock' || parent.type === 'KeyBlock') + (parent.type === 'IfBlock' || + parent.type === 'EachBlock' || + parent.type === 'AwaitBlock' || + parent.type === 'KeyBlock') ) { return namespace; }