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

Could not match correct Router #5065

Closed
IamFive opened this issue Jul 21, 2020 · 1 comment
Closed

Could not match correct Router #5065

IamFive opened this issue Jul 21, 2020 · 1 comment

Comments

@IamFive
Copy link

IamFive commented Jul 21, 2020

What happens?

When a parent-route[1] matches a location, umijs will not continue searching other routes even all sub routes of this parent-route[1] does not match the location.

When matching Route, umijs does not using DFS.
When First level route matches the location, it will not check whether any sub route of this route matches location.

Mini Showcase Repository(REQUIRED)

Provide a mini GitHub repository which can reproduce the issue. Use yarn create @umijs/umi-app then upload to your GitHub

IamFive/ant-design@3aadf84

git clone https://github.com/IamFive/ant-design antd-v5.1-route-match-issue
cd antd-v5.1-route-match-issue
git checkout v5.1
yarn
yarn start

How To Reproduce

Steps to reproduce the behavior: 1. 2.

After start app, login and visit http://localhost:8000/admin/showcases, it renders correctly.
Then visit http://localhost:8000/admin2/showcases or http://localhost:8000/list, it shows a blank page.

Expected behavior 1. 2.
http://localhost:8000/admin2/showcases and http://localhost:8000/list should be rendered correctly.

Context

  • Umi Version:
    umi@3.2.10

  • Node Version:
    v12.13.1

  • Platform:
    Window 10

@sorrycc
Copy link
Member

sorrycc commented Jan 17, 2021

It's inactive above 3 months, feel free to reopen if still have problems.

@sorrycc sorrycc closed this as completed Jan 17, 2021
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

No branches or pull requests

2 participants