Skip to content
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

Navigation error when removing parent module #473

Open
jmailaender opened this issue Aug 11, 2022 · 1 comment
Open

Navigation error when removing parent module #473

jmailaender opened this issue Aug 11, 2022 · 1 comment
Assignees
Labels
bug Something isn't working needs triage

Comments

@jmailaender
Copy link

Hi there,

I created a new application from the starter repository using npx @roxi/routify@next create myapp, added _module.svelte with a simple layout plus two child pages child1 and child2. Navigating to the children works fine as long as the parent module is not removed using <!-- routify:meta reset --> which raises the error

Uncaught (in promise) Error: couldn't find context for _default_child1_index_md
at handlePageChange (ComposeFragments.svelte? [sm]:44:27)
at $$self.$$.update (ComposeFragments.svelte? [sm]:56:34)
at update (index.mjs:1089:12)
at flush (index.mjs:1060:13)

immediatly after changing the URL to /child1. Reloading the page displays it correctly, but navigating to / fails with a similar error.

The sample application is available here.

Is this supposed to work or did I miss anything?

Thanks for your support!
David

package.json

{
    "name": "starter",
    "type": "module",
    "scripts": {
        "build": "vite build",
        "preview": "vite preview",
        "dev": "vite"
    },
    "devDependencies": {
        "@roxi/routify": "^3.0.0-next.106",
        "@sveltejs/vite-plugin-svelte": "^1.0.0-next.49",
        "mdsvex": "^0.9.3",
        "svelte": "^3.39.0",
        "vite": "^3.0.5"
    }
}

version
routify: 3.0.0-next.106

@jmailaender jmailaender added bug Something isn't working needs triage labels Aug 11, 2022
@jakobrosenberg jakobrosenberg self-assigned this Aug 11, 2022
@jakobrosenberg
Copy link
Member

Thanks for the heads up @dmailaender. I think this is a regression bug. I spotted something similar recently. I'll try get a fix out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

2 participants