Skip to content

Param not present when redirecting multiple times #1762

Open
@adam-lynch

Description

@adam-lynch

Version

2.7.0

Reproduction link

https://codesandbox.io/embed/xokkpop154?module=%2Frouter%2Findex.js

Steps to reproduce

  1. Create a route definition for / which redirects to /a
  2. Create a route definition for /a which redirects to /a/b/1.
  3. Create a route definition for /a/b/:id which redirects to /a/b/:id/c.
  4. Create a route definition for /a/b/:id/c which points to a component.
  5. Navigate to / using your browser's address bar.

What is expected?

You end up at /a/b/1/c.

What is actually happening?

You end up at /a/b/undefined/c.


If using a function in step 3, params is an empty object.

If you go directly to a/b/1, it works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed on 4.xThis issue has been already fixed on the v4 but exists in v3improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions