Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow mismatch href and as when manually provided * Swap warning and error and throw error in production also * Add test for mismatch error in production * Update to only show warning in development
- Loading branch information
Showing
4 changed files
with
98 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default () => 'hi from post' |
7 changes: 7 additions & 0 deletions
7
test/integration/invalid-href/pages/dynamic-route-mismatch-manual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Link from 'next/link' | ||
|
||
export default () => ( | ||
<Link href="/[post]?post=post-1" as="/blog/post-1"> | ||
<a>Click me</a> | ||
</Link> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters