Skip to content

Commit a51cc25

Browse files
committed
fix: initialize spread needs_isolation based on if there are directives with has_call
1 parent 468ae96 commit a51cc25

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ export function RegularElement(node, context) {
211211
node,
212212
node_id,
213213
// If value binding exists, that one takes care of calling $.init_select
214-
value_binding === null && node.name === 'select'
214+
value_binding === null && node.name === 'select',
215+
class_directives.some((cd) => cd.metadata.expression.has_call) ||
216+
style_directives.some((sd) => sd.metadata.expression.has_call)
215217
);
216218
is_attributes_reactive = true;
217219
} else {
@@ -447,10 +449,9 @@ function build_element_spread_attributes(
447449
context,
448450
element,
449451
element_id,
450-
needs_select_handling
452+
needs_select_handling,
453+
needs_isolation = false
451454
) {
452-
let needs_isolation = false;
453-
454455
/** @type {ObjectExpression['properties']} */
455456
const values = [];
456457

0 commit comments

Comments
 (0)