From b87eb5a893372a65e3dadca295aca79ffc2f9e33 Mon Sep 17 00:00:00 2001 From: Mathias Picker <48158184+MathiasWP@users.noreply.github.com> Date: Tue, 5 May 2026 13:54:14 +0200 Subject: [PATCH] chore: drop redundant String() coercion in to_style After the new normalization step, `value` at the final return is always either null/undefined or a string, so `String(value)` is doing nothing. --- packages/svelte/src/internal/shared/attributes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/svelte/src/internal/shared/attributes.js b/packages/svelte/src/internal/shared/attributes.js index cb45af1839..f2602055a1 100644 --- a/packages/svelte/src/internal/shared/attributes.js +++ b/packages/svelte/src/internal/shared/attributes.js @@ -263,5 +263,5 @@ export function to_style(value, styles) { // Empty results drop the attribute entirely so that client and SSR agree // (the directive path above already returns `null` for empty output). - return value == null || value === '' ? null : String(value); + return value == null || value === '' ? null : value; }