File tree Expand file tree Collapse file tree 1 file changed +24
-25
lines changed
packages/svelte/src/compiler/phases/3-transform/client/visitors Expand file tree Collapse file tree 1 file changed +24
-25
lines changed Original file line number Diff line number Diff line change @@ -227,36 +227,35 @@ function setup_select_synchronization(value_binding, context) {
227227}
228228}
229229
230- const to_invalidate = context . state . analysis . runes
231- ? b . empty
232- : b . stmt (
230+ if ( ! context . state . analysis . runes ) {
231+ const invalidator = b . call (
232+ '$.invalidate_inner_signals' ,
233+ b . thunk (
234+ b . block (
235+ names . map ( ( name ) => {
236+ const serialized = serialize_get_binding ( b . id ( name ) , context . state ) ;
237+ return b . stmt ( serialized ) ;
238+ } )
239+ )
240+ )
241+ ) ;
242+
243+ context . state . init . push (
244+ b . stmt (
233245b . call (
234- '$.invalidate_inner_signals ' ,
246+ '$.invalidate_effect ' ,
235247b . thunk (
236- b . block (
237- names . map ( ( name ) => {
238- const serialized = serialize_get_binding ( b . id ( name ) , context . state ) ;
239- return b . stmt ( serialized ) ;
240- } )
241- )
248+ b . block ( [
249+ b . stmt (
250+ /** @type { import('estree').Expression } */ ( context . visit ( value_binding . expression ) )
251+ ) ,
252+ b . stmt ( invalidator )
253+ ] )
242254)
243255)
244- ) ;
245- context . state . init . push (
246- b . stmt (
247- b . call (
248- '$.invalidate_effect' ,
249- b . thunk (
250- b . block ( [
251- b . stmt (
252- /** @type {import('estree').Expression } */ ( context . visit ( value_binding . expression ) )
253- ) ,
254- to_invalidate
255- ] )
256- )
257256)
258- )
259- ) ;
257+ ) ;
258+ }
260259}
261260
262261/**
You can’t perform that action at this time.
0 commit comments