Skip to content

Can't modify state in module context #14250

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

Closed
michielp1807 opened this issue Nov 10, 2024 · 0 comments · Fixed by #14253
Closed

Can't modify state in module context #14250

michielp1807 opened this issue Nov 10, 2024 · 0 comments · Fixed by #14253

Comments

@michielp1807
Copy link

michielp1807 commented Nov 10, 2024

Describe the bug

If we define some $state in a module script, then attempts to modify that state will lead to a vague "module.end is null" error in Firefox, or a vague "Cannot read properties of null (reading 'line')" error in Chrome.

Reproduction

Note that with simple state types, such as just a number or a string, it does work fine without problems.

Logs

No response

System Info

System:
    OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (4) x64 AMD Ryzen 3 3200G with Radeon Vega Graphics
    Memory: 6.45 GB / 15.54 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 22.11.0 - ~/.nvm/versions/node/v22.11.0/bin/node
    npm: 10.9.0 - ~/.nvm/versions/node/v22.11.0/bin/npm
  Browsers:
    Chromium: 130.0.6723.91
  npmPackages:
    svelte: ^5.0.0 => 5.1.13

Severity

annoyance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant