Skip to content

Fallthrough routes (2 routes with slugs on same level) Regression issue .137 #2041

@zwergius

Description

@zwergius

Describe the bug

I cannot make a route fallthough when in SSR, this works as expected when client is navigating

This also affects when I export with static-adapter as all these routes return 500

Reproduction

This issue only appears in SSR mode, I reproduce by going to the route in question and refreshing (F5)

I have 2 routes:

src/routes/[legal]/index.svelte
src/routes/[page]/index.svelte

I manually check in my load function inside src/routes/[legal]/index.svelte
if (!validRoute) return

But this never reaches the load function in src/routes/[page]/index.svelte I see a 500 Internal server error in my console and the page shows the following message:

Bad request in load function: “failed to fetch undefined”

Logs

No response

System Info

System:
    OS: macOS 11.5.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 4.60 GB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.5.0 - ~/.n/bin/node
    Yarn: 1.22.10 - ~/.n/bin/yarn
    npm: 7.19.1 - ~/.n/bin/npm
  Browsers:
    Brave Browser: 91.1.26.77
    Chrome: 92.0.4515.107
    Firefox: 89.0.2
    Safari: 14.1.2
    Safari Technology Preview: 15.0
  npmPackages:
    @sveltejs/adapter-static: ^1.0.0-next.7 => 1.0.0-next.13 
    @sveltejs/kit: ^1.0.0-next.109 => 1.0.0-next.138 
    svelte: ^3.40.1 => 3.41.0 
    vite: ^2.1.0 => 2.4.4

Severity

blocking an upgrade

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions