diff --git a/packages/svelte/src/compiler/migrate/index.js b/packages/svelte/src/compiler/migrate/index.js index fa6b427fc9..90a7c17c2a 100644 --- a/packages/svelte/src/compiler/migrate/index.js +++ b/packages/svelte/src/compiler/migrate/index.js @@ -47,7 +47,7 @@ function migrate_css(state) { // since we already blank css we can't work directly on `state.str` so we will create a copy that we can update const str = new MagicString(code); - while (!code.startsWith('') && !!code.trim()) { + while (code) { if ( code.startsWith(':has') || code.startsWith(':not') ||