diff --git a/.changeset/itchy-oranges-behave.md b/.changeset/itchy-oranges-behave.md new file mode 100644 index 0000000000..47ec3e2a26 --- /dev/null +++ b/.changeset/itchy-oranges-behave.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: remove unnecessary update assignments diff --git a/packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js b/packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js index 6e9ddc0750..f65e600e74 100644 --- a/packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js +++ b/packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js @@ -248,8 +248,8 @@ export function RegularElement(node, context) { : `="${value === true ? '' : escape_html(value, true)}"` }` ); - continue; } + continue; } const is = is_custom_element diff --git a/packages/svelte/tests/runtime-runes/samples/empty-class-attribute-template/_config.js b/packages/svelte/tests/runtime-runes/samples/empty-class-attribute-template/_config.js new file mode 100644 index 0000000000..e7ec12dfd6 --- /dev/null +++ b/packages/svelte/tests/runtime-runes/samples/empty-class-attribute-template/_config.js @@ -0,0 +1,6 @@ +import { ok, test } from '../../test'; +import { flushSync } from 'svelte'; + +export default test({ + html: `
` +}); diff --git a/packages/svelte/tests/runtime-runes/samples/empty-class-attribute-template/main.svelte b/packages/svelte/tests/runtime-runes/samples/empty-class-attribute-template/main.svelte new file mode 100644 index 0000000000..078d802c64 --- /dev/null +++ b/packages/svelte/tests/runtime-runes/samples/empty-class-attribute-template/main.svelte @@ -0,0 +1,2 @@ + + \ No newline at end of file