forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add warning when a page is rendered without a starting / (vercel#11418)
* Add error/warning when a page is rendered without a / Throws an error for development and gives a warning in production * Add tests for error when rendering without starting slash * Update to always warn and add err.sh * Update errors/render-no-starting-slash.md Co-authored-by: JJ Kasper <[email protected]> Co-authored-by: Tim Neutkens <[email protected]>
- Loading branch information
1 parent
8f4e265
commit cdc7f01
Showing
5 changed files
with
77 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Rendering Without Starting Slash | ||
|
||
#### Why This Error Occurred | ||
|
||
When calling `app.render(req, res, path)` the `path` did not begin with a slash (`/`). This causes unexpected behavior and should be corrected. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Make sure the `path` being passed to `app.render` always starts with a slash (`/`) |
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
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