mirror of https://github.com/sveltejs/svelte
Previously the client kept an empty `style=""` for empty-string values
while SSR dropped the attribute, which is a hydration mismatch and now
also affects every object/array input that filters down to nothing
(`style={false}`, `style={{}}`, `style={[null, false]}`). Coerce empty
to `null` in `to_style` so client and SSR agree, matching what the
directive path already did and what `to_class` does for `class={''}`.
Two existing tests asserted `<div style="">` for `component.style = ''`
as an incidental side effect; updated to expect the attribute dropped.
pull/18176/head
parent
cd5b9add37
commit
b6b6d03869
Loading…
Reference in new issue