diff --git a/src/index.js b/src/index.js index a617432..4c7fe19 100644 --- a/src/index.js +++ b/src/index.js @@ -480,13 +480,13 @@ function _renderToString( return str; } catch (error) { if (!asyncMode && renderer && renderer.onError) { - let res = renderer.onError(error, vnode, (child) => + let res = renderer.onError(error, vnode, (child, parent) => _renderToString( child, context, isSvgMode, selectValue, - vnode, + parent, asyncMode, renderer ) diff --git a/src/lib/chunked.js b/src/lib/chunked.js index 38e6a26..cd1686d 100644 --- a/src/lib/chunked.js +++ b/src/lib/chunked.js @@ -75,7 +75,7 @@ function handleError(error, vnode, renderChild) { const promise = error.then( () => { if (abortSignal && abortSignal.aborted) return; - const child = renderChild(vnode.props.children); + const child = renderChild(vnode.props.children, vnode); if (child) this.onWrite(createSubtree(id, child)); }, // TODO: Abort and send hydration code snippet to client