Commit e0719bb
committed
fix(webapp): match the environment path on a segment boundary
The page below the environment was sliced off the front of the pathname on
a bare startsWith, so an environment slug that strictly prefixes another —
branch slugs are `<parent>-<branch>`, making `preview-feat` a prefix of
`preview-feat-2` — yielded a garbled suffix that resolved to no page. The
switcher hooks can hit this mid-navigation, where the pathname comes from
the pending location but the environment path still comes from the current
match.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 2d2c417 commit e0719bb
2 files changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
440 | 448 | | |
441 | 449 | | |
442 | 450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
| |||
0 commit comments