Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fixed] Double slash in href when parent route has optional trailing …
…slash When a parent route of a child route has an optional trailing slash, the generated path for the child route will have two slashes in a row. Fix the trailing slash matcher pattern to account for this case. This bug occurs when calling `Path.injectParams(pattern, params)` to generate a path. The `pattern` for the path of a child route whose parent has an optional trailing slash looks something like `parent/?/child`. If we just replace `/?` with `/` we end up with `parent//child`, so we need to replace `/?/` with `/`. This fixes issue remix-run#768.
- Loading branch information