Skip to content

Commit 1ad33a3

Browse files
committed
tweak
1 parent 5eaec30 commit 1ad33a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ function build_element_special_value_attribute(element, node_id, attribute, cont
675675
value
676676
)
677677
);
678-
const is_reactive = attribute.metadata.expression.has_state;
678+
679679
const is_select_with_value =
680680
// attribute.metadata.dynamic would give false negatives because even if the value does not change,
681681
// the inner options could still change, so we need to always treat it as reactive
@@ -698,7 +698,7 @@ function build_element_special_value_attribute(element, node_id, attribute, cont
698698
state.init.push(b.stmt(b.call('$.init_select', node_id, b.thunk(value))));
699699
}
700700

701-
if (is_reactive) {
701+
if (attribute.metadata.expression.has_state) {
702702
const id = state.scope.generate(`${node_id.name}_value`);
703703
build_update_assignment(
704704
state,

0 commit comments

Comments
 (0)