-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
effects.js causes Fatal Error #14296
Comments
I manually edit the node modules in my project and came up with following solution: /**
* Internal representation of `$: ..`
* @param {() => any} deps
* @param {() => void | (() => void)} fn
*/
export function legacy_pre_effect(deps, fn) {
var context = /** @type {ComponentContextLegacy} */ (component_context);
/** @type {{ effect: null | Effect, ran: boolean }} */
var token = { effect: null, ran: false };
if(context.l !=null &&context.l.r1 !=null ){
context.l.r1.push(token);
}
token.effect = render_effect(() => {
deps();
// If this legacy pre effect has already run before the end of the reset, then
// bail out to emulate the same behavior.
if (token.ran) return;
token.ran = true;
if(context.l!=null && context.l.r2 !=null){
set(context.l.r2, true);
}
untrack(fn);
});
} Edit: |
Please provide a reproduction repository. You can use stackblitz or push a github repository. |
This is a hard issue to provide a reproduction for. I can only reproduce this in production (dev servers do not produce the error nor does Best I can do is a private staging environment with source maps. If someone on the Svelte team wants to investigate, I can give them access. Drop me a line at niece-clavicle-gem (at) duck (dot) com. |
Describe the bug
Push to 'null' causes total crash of project.
The error causing line is at src/internal/client/reactivity/effect.js:270
context.l.r1.push(token);
Error message:
Reproduction
In a seperate project, which I created by the template doesn't show that effect.
Sorry, I'm not so deep into svelte-internals to know how this bug can be reproduced
External libs that caused this error:
"svelte-fa"
"svelte-file-dropzone"
I tried to add some icons with Fa in the basic example but it doesn't show the effect I face in production.
Logs
System Info
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: