Skip to content

Commit ece16ad

Browse files
committed
drive-by
1 parent 174629d commit ece16ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/svelte/src/internal/client/dom/elements/attributes.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ export function set_custom_element_data(node, prop, value) {
213213
// or effect
214214
var previous_reaction = active_reaction;
215215
var previous_effect = active_effect;
216+
216217
// If we're hydrating but the custom element is from Svelte, and it already scaffolded,
217218
// then it might run block logic in hydration mode, which we have to prevent.
218219
let was_hydrating = hydrating;
@@ -222,9 +223,10 @@ export function set_custom_element_data(node, prop, value) {
222223

223224
set_active_reaction(null);
224225
set_active_effect(null);
226+
225227
try {
226228
if (
227-
// style need set_attribute()
229+
// `style` should use `set_attribute` rather than the setter
228230
prop !== 'style' &&
229231
// Don't compute setters for custom elements while they aren't registered yet,
230232
// because during their upgrade/instantiation they might add more setters.

0 commit comments

Comments
 (0)