Skip to content

Commit 5615fd3

Browse files
committed
tweak
1 parent 39b7f41 commit 5615fd3

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,7 @@ export function RegularElement(node, context) {
393393
if (!has_spread && needs_special_value_handling) {
394394
for (const attribute of /** @type {AST.Attribute[]} */ (attributes)) {
395395
if (attribute.name === 'value') {
396-
build_element_special_value_attribute(
397-
node.name,
398-
node_id,
399-
attribute,
400-
context,
401-
context.state
402-
);
396+
build_element_special_value_attribute(node.name, node_id, attribute, context);
403397
break;
404398
}
405399
}
@@ -626,9 +620,9 @@ function build_custom_element_attribute_update_assignment(node_id, attribute, co
626620
* @param {Identifier} node_id
627621
* @param {AST.Attribute} attribute
628622
* @param {ComponentContext} context
629-
* @param {ComponentClientTransformState} state
630623
*/
631-
function build_element_special_value_attribute(element, node_id, attribute, context, state) {
624+
function build_element_special_value_attribute(element, node_id, attribute, context) {
625+
const state = context.state;
632626
const is_select_with_value =
633627
// attribute.metadata.dynamic would give false negatives because even if the value does not change,
634628
// the inner options could still change, so we need to always treat it as reactive

0 commit comments

Comments
 (0)