Skip to content

async call lead to error after saving file #16439

@simonhackler

Description

@simonhackler

Describe the bug

Having 2 chained async calls inside the top level of a page it works when navigating on the page.
Then after saving the page it will beak with this error:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'increment')

Reproduction

https://github.com/simonhackler/svelte-async-repro

run npm run dev
navigate to localhost:5173 and everything should work. Then delete or add a line inside src/routes/+page.svelte and save and it will lead to this error:
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'increment')

Logs

System Info

System:
    OS: Linux 6.14 Arch Linux
    CPU: (6) x64 Intel(R) Core(TM) i5-9600K CPU @ 3.70GHz
    Memory: 15.87 GB / 31.26 GB
    Container: Yes
    Shell: 5.2.37 - /bin/bash
  Binaries:
    Node: 22.17.1 - ~/.nvm/versions/node/v22.17.1/bin/node
    npm: 10.9.2 - ~/.nvm/versions/node/v22.17.1/bin/npm
  Browsers:
    Brave Browser: 134.1.76.74
  npmPackages:
    svelte: ^5.0.0 => 5.36.8

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy