Skip to content

Commit f85d491

Browse files
committed
remove more unwanted args
1 parent 19000d1 commit f85d491

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ function serialize_inline_component(node, component_name, context, anchor = cont
816816
b.id('$.add_owner_effect'),
817817
b.thunk(expression),
818818
b.id(component_name),
819-
b.literal(is_ignored(node, 'ownership_invalid_binding'))
819+
is_ignored(node, 'ownership_invalid_binding') && b.true
820820
)
821821
)
822822
);
@@ -1843,7 +1843,7 @@ export const template_visitors = {
18431843
b.thunk(/** @type {Expression} */ (context.visit(node.expression))),
18441844
b.literal(context.state.metadata.namespace === 'svg'),
18451845
b.literal(context.state.metadata.namespace === 'mathml'),
1846-
b.literal(is_ignored(node, 'hydration_html_changed'))
1846+
is_ignored(node, 'hydration_html_changed') && b.true
18471847
)
18481848
)
18491849
);
@@ -2936,9 +2936,6 @@ export const template_visitors = {
29362936
)) &&
29372937
context.state.options.dev &&
29382938
context.state.analysis.runes &&
2939-
// serialize_validate_binding will add a function that specifically throw
2940-
// `binding_property_non_reactive` error. If there's a svelte ignore
2941-
// before we avoid adding this validation to avoid throwing the runtime warning
29422939
!is_ignored(node, 'binding_property_non_reactive')
29432940
) {
29442941
context.state.init.push(

packages/svelte/src/compiler/phases/3-transform/server/visitors/CallExpression.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function CallExpression(node, context) {
2929
return b.call(
3030
'$.snapshot',
3131
/** @type {Expression} */ (context.visit(node.arguments[0])),
32-
b.literal(is_ignored(node, 'state_snapshot_uncloneable'))
32+
is_ignored(node, 'state_snapshot_uncloneable') && b.true
3333
);
3434
}
3535

packages/svelte/tests/snapshot/samples/dynamic-attributes-casing/_expected/client/main.svelte.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ export default function Main($$anchor) {
1313
var custom_element = $.sibling($.sibling(svg, true));
1414
var div_1 = $.sibling($.sibling(custom_element, true));
1515

16-
$.template_effect(() => $.set_attribute(div_1, "foobar", y(), false));
16+
$.template_effect(() => $.set_attribute(div_1, "foobar", y()));
1717

1818
var svg_1 = $.sibling($.sibling(div_1, true));
1919

20-
$.template_effect(() => $.set_attribute(svg_1, "viewBox", y(), false));
20+
$.template_effect(() => $.set_attribute(svg_1, "viewBox", y()));
2121

2222
var custom_element_1 = $.sibling($.sibling(svg_1, true));
2323

2424
$.template_effect(() => $.set_custom_element_data(custom_element_1, "fooBar", y()));
2525

2626
$.template_effect(() => {
27-
$.set_attribute(div, "foobar", x, false);
28-
$.set_attribute(svg, "viewBox", x, false);
27+
$.set_attribute(div, "foobar", x);
28+
$.set_attribute(svg, "viewBox", x);
2929
$.set_custom_element_data(custom_element, "fooBar", x);
3030
});
3131

0 commit comments

Comments
 (0)