Skip to content

Commit

Permalink
use suspense boundary vnode as parent for re-render
Browse files Browse the repository at this point in the history
  • Loading branch information
f0x52 committed Jan 8, 2025
1 parent 2da38a7 commit c4f90dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/chunked.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c4f90dc

Please sign in to comment.