File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/svelte/src/compiler/phases/3-transform/server Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -415,7 +415,8 @@ const global_visitors = {
415
415
const args = /** @type {import('estree').Expression[] } */ (
416
416
node . arguments . map ( ( arg ) => context . visit ( arg ) )
417
417
) ;
418
- return b . call ( '$.effect_root' , ...args ) ;
418
+ // Just call the function directly
419
+ return b . call ( args [ 0 ] ) ;
419
420
}
420
421
421
422
if ( rune === '$state.snapshot' ) {
@@ -578,7 +579,7 @@ const javascript_visitors_runes = {
578
579
for ( const declarator of node . declarations ) {
579
580
const init = declarator . init ;
580
581
const rune = get_rune ( init , state . scope ) ;
581
- if ( ! rune || rune === '$effect.tracking' || rune === '$inspect' ) {
582
+ if ( ! rune || rune === '$effect.tracking' || rune === '$inspect' || rune === '$effect.root' ) {
582
583
declarations . push ( /** @type {import('estree').VariableDeclarator } */ ( visit ( declarator ) ) ) ;
583
584
continue ;
584
585
}
You can’t perform that action at this time.
0 commit comments