mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Move lastAppProps back where it should be (#1208)
* Check for lastAppProps * Move lastAppProps back where it belongs * Add comment
This commit is contained in:
parent
310f430963
commit
20c7d98efe
|
@ -77,11 +77,12 @@ async function doRender ({ Component, props, err, emitter }) {
|
|||
props = props || lastAppProps.props
|
||||
|
||||
const appProps = { Component, props, err, router, headManager }
|
||||
// lastAppProps has to be set before ReactDom.render to account for ReactDom throwing an error.
|
||||
lastAppProps = appProps
|
||||
|
||||
ReactDOM.render(createElement(App, appProps), container)
|
||||
|
||||
if (emitter) {
|
||||
emitter.emit('after-reactdom-render', { Component })
|
||||
}
|
||||
|
||||
lastAppProps = appProps
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue