fix: use local value variable instead of next[key] in null check

Applies reviewer suggestion for consistency since value is already
assigned from next[key] on the line above.

Also adds required changeset for patch version bump.
pull/18200/head
OfirHaf 3 weeks ago
parent 81458c0696
commit 5d8fa9df7a

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: strip trailing semicolons in style directive reactive updates

@ -12,7 +12,7 @@ function update_styles(dom, prev = {}, next, priority) {
var value = next[key];
if (prev[key] !== value) {
if (next[key] == null) {
if (value == null) {
dom.style.removeProperty(key);
} else {
// setProperty rejects values with trailing semicolons; strip them so that

Loading…
Cancel
Save