Commit 20c7d98e authored by Tim Neutkens's avatar Tim Neutkens Committed by Naoyuki Kanezawa

Move lastAppProps back where it should be (#1208)

* Check for lastAppProps

* Move lastAppProps back where it belongs

* Add comment
parent 310f4309
...@@ -77,11 +77,12 @@ async function doRender ({ Component, props, err, emitter }) { ...@@ -77,11 +77,12 @@ async function doRender ({ Component, props, err, emitter }) {
props = props || lastAppProps.props props = props || lastAppProps.props
const appProps = { Component, props, err, router, headManager } 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) ReactDOM.render(createElement(App, appProps), container)
if (emitter) { if (emitter) {
emitter.emit('after-reactdom-render', { Component }) emitter.emit('after-reactdom-render', { Component })
} }
lastAppProps = appProps
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment