Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
17f6fa96
Commit
17f6fa96
authored
May 18, 2019
by
Yuki Takemoto
Committed by
Tim Neutkens
May 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken link (#7378)
parent
12f4c718
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
render.tsx
packages/next-server/server/render.tsx
+1
-1
index.test.js
test/integration/no-override-next-props/test/index.test.js
+1
-1
No files found.
packages/next-server/server/render.tsx
View file @
17f6fa96
...
...
@@ -295,7 +295,7 @@ export async function renderToHTML(
if
(
dev
&&
(
props
.
router
||
props
.
Component
))
{
throw
new
Error
(
`'router' and 'Component' can not be returned in getInitialProps from _app.js https://err.sh/zeit/next.js/cant-override-next-props
.md
`
,
`'router' and 'Component' can not be returned in getInitialProps from _app.js https://err.sh/zeit/next.js/cant-override-next-props`
,
)
}
}
...
...
test/integration/no-override-next-props/test/index.test.js
View file @
17f6fa96
...
...
@@ -22,6 +22,6 @@ describe('Dynamic require', () => {
it
(
'should show error when a Next prop is returned in _app.getInitialProps'
,
async
()
=>
{
const
html
=
await
renderViaHTTP
(
appPort
,
'/'
)
expect
(
html
).
toMatch
(
/https:
\/\/
err
\.
sh
\/
zeit
\/
next
\.
js
\/
cant-override-next-props
\.
md
/
)
expect
(
html
).
toMatch
(
/https:
\/\/
err
\.
sh
\/
zeit
\/
next
\.
js
\/
cant-override-next-props/
)
})
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment