Skip to content

Commit 04768e4

Browse files
committed
fix: spreading
1 parent 68c30bc commit 04768e4

File tree

2 files changed

+16
-24
lines changed

2 files changed

+16
-24
lines changed

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,15 @@ export function RegularElement(node, context) {
8787
'=',
8888
b.id('$$payload.select_value'),
8989
b.member(
90-
b.call(
91-
'$.spread_attributes',
92-
build_spread_object(
93-
node,
94-
node.attributes.filter(
95-
(attribute) =>
96-
attribute.type === 'Attribute' ||
97-
attribute.type === 'BindDirective' ||
98-
attribute.type === 'SpreadAttribute'
99-
),
100-
context
90+
build_spread_object(
91+
node,
92+
node.attributes.filter(
93+
(attribute) =>
94+
attribute.type === 'Attribute' ||
95+
attribute.type === 'BindDirective' ||
96+
attribute.type === 'SpreadAttribute'
10197
),
102-
b.null
98+
context
10399
),
104100
'value',
105101
false,

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -211,19 +211,15 @@ export function build_element_attributes(node, context) {
211211
'$.maybe_selected',
212212
b.id('$$payload'),
213213
b.member(
214-
b.call(
215-
'$.spread_attributes',
216-
build_spread_object(
217-
node,
218-
node.attributes.filter(
219-
(attribute) =>
220-
attribute.type === 'Attribute' ||
221-
attribute.type === 'BindDirective' ||
222-
attribute.type === 'SpreadAttribute'
223-
),
224-
context
214+
build_spread_object(
215+
node,
216+
node.attributes.filter(
217+
(attribute) =>
218+
attribute.type === 'Attribute' ||
219+
attribute.type === 'BindDirective' ||
220+
attribute.type === 'SpreadAttribute'
225221
),
226-
b.null
222+
context
227223
),
228224
'value',
229225
false,

0 commit comments

Comments
 (0)