next.js
3a49a29a - If prefetching detected as app route, pass "as" to handleHardNavigation instead of "url" (#47949)

Commit
2 years ago
If prefetching detected as app route, pass "as" to handleHardNavigation instead of "url" (#47949) ### Fixing a bug Follow-up to https://github.com/vercel/next.js/pull/47761: It seems that `handleHardNavigation` needs to take `as` instead of `url`, in order to be consistent with the rest of the code. Without this, it seems to cause an issue if you are using a link that uses legacy `as` prop which matches the bloom filter (and therefore `__appRouter` is set as `true`). However, I spent couple hours trying to come up with a failing test case without this change but unfortunately couldn't come up with one. x-ref: [Slack Thread](https://vercel.slack.com/archives/C017QMYC5FB/p1680668865572729?thread_ts=1680225393.243459&cid=C017QMYC5FB) Co-authored-by: JJ Kasper <jj@jjsweb.site>
Author
Parents
Loading