You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportdefaultfunctionApp($$payload,$$props){$.push(false);constsnippetToRender=snippetWithSlider;// It works thanks to function hoisting functionsnippetWithSlider($$payload){$$payload.out+=`<!--[-->`;Slider($$payload,{});$$payload.out+=`<!--]-->`;}$$payload.out+=`<!--[-->`;snippetToRender($$payload);$$payload.out+=`<!--]-->`;$.pop();}
compiles to a code that has a bug with `snippetWithSlider` scope
exportdefaultfunctionApp($$payload,$$props){$.push(true);constsnippetToRender=snippetWithSlider;// Not in scope letsliderValue=0;let$$settled=true;let$$inner_payload;function$$render_inner($$payload){functionsnippetWithSlider($$payload){$$payload.out+=`<!--[-->`;Slider($$payload,{getvalue(){returnsliderValue;},setvalue($$value){sliderValue=$$value;$$settled=false;}});$$payload.out+=`<!--]-->`;}// etc.
Yes should be fixed by it - therefore closing as a duplicate of #11086 (even if yours came first, because this one was closed while I looked at it and now the PR references that issue)
Describe the bug
Compiling the following component works as expected in SSR mode:
compiles to
But if I add a
bind
prop:compiles to a code that has a bug with `snippetWithSlider` scope
Reproduction
https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE42QwU7DMAyGXyUySGulah3i1jUTvAIgOBAO3epCpDSJErcCVX135LaDaXDYzbb8f_5_D9BogxGK1wFs1SIUcO89ZEBfnpvYoyGEDKLrwoEnZTwE7WmnrCLdehdIPBpdYxBNcK1YrfO5Xc_S1ZYXD85GEtFq75Ge3ANaFsjj5EXTx6yatg2SiFP7XJkOhRTXkSrCZJMqW-a_BuxwtRD-kpJ0ZFa5mNtrWxc94-Rwwh5FvlN2yBf5OEHvwuzvzO9EhAxaV-tGYw0FhQ7H7Odz86lLn8cpB9EfE7LBam84pBh54IPzMUm3Z5FLbX1Hgk9IBaGy76hAtNpKBRuuqk-p4JbLSOilghsFJ_GnwP_leBu_AaLgX0QNAgAA
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: