Skip to content

Commit

Permalink
Remove false positive link prefetch warning (#12485)
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 authored Dec 6, 2024
1 parent 5213a95 commit 64e0a03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/serious-chairs-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-router": patch
---

Remove `<Link prefetch>` warning which suffers from false positives in a lazy route discovery world
1 change: 0 additions & 1 deletion packages/react-router/lib/dom/ssr/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ export function PrefetchPageLinks({
);

if (!matches) {
console.warn(`Tried to prefetch ${page} but no routes matched.`);
return null;
}

Expand Down

0 comments on commit 64e0a03

Please sign in to comment.