Skip to content

Commit c4f90dc

Browse files
committed
use suspense boundary vnode as parent for re-render
1 parent 2da38a7 commit c4f90dc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,13 @@ function _renderToString(
480480
return str;
481481
} catch (error) {
482482
if (!asyncMode && renderer && renderer.onError) {
483-
let res = renderer.onError(error, vnode, (child) =>
483+
let res = renderer.onError(error, vnode, (child, parent) =>
484484
_renderToString(
485485
child,
486486
context,
487487
isSvgMode,
488488
selectValue,
489-
vnode,
489+
parent,
490490
asyncMode,
491491
renderer
492492
)

src/lib/chunked.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function handleError(error, vnode, renderChild) {
7575
const promise = error.then(
7676
() => {
7777
if (abortSignal && abortSignal.aborted) return;
78-
const child = renderChild(vnode.props.children);
78+
const child = renderChild(vnode.props.children, vnode);
7979
if (child) this.onWrite(createSubtree(id, child));
8080
},
8181
// TODO: Abort and send hydration code snippet to client

0 commit comments

Comments
 (0)