GeezerVison is showing github.com — [Fix] Errors should not "unsuspend" a transition (#22423) · react/react@05726d7
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/react-reconciler/src
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.new.js +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1445,7 +1445,8 @@ export function renderDidSuspend(): void { |
1445 | 1445 | export function renderDidSuspendDelayIfPossible(): void { |
1446 | 1446 | if ( |
1447 | 1447 | workInProgressRootExitStatus === RootIncomplete || |
1448 | | - workInProgressRootExitStatus === RootSuspended |
| 1448 | + workInProgressRootExitStatus === RootSuspended || |
| 1449 | + workInProgressRootExitStatus === RootErrored |
1449 | 1450 | ) { |
1450 | 1451 | workInProgressRootExitStatus = RootSuspendedWithDelay; |
1451 | 1452 | } |
@@ -1469,7 +1470,7 @@ export function renderDidSuspendDelayIfPossible(): void { |
1469 | 1470 | } |
1470 | 1471 |
|
1471 | 1472 | export function renderDidError() { |
1472 | | - if (workInProgressRootExitStatus !== RootCompleted) { |
| 1473 | + if (workInProgressRootExitStatus !== RootSuspendedWithDelay) { |
1473 | 1474 | workInProgressRootExitStatus = RootErrored; |
1474 | 1475 | } |
1475 | 1476 | } |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberWorkLoop.old.js +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1445,7 +1445,8 @@ export function renderDidSuspend(): void { |
1445 | 1445 | export function renderDidSuspendDelayIfPossible(): void { |
1446 | 1446 | if ( |
1447 | 1447 | workInProgressRootExitStatus === RootIncomplete || |
1448 | | - workInProgressRootExitStatus === RootSuspended |
| 1448 | + workInProgressRootExitStatus === RootSuspended || |
| 1449 | + workInProgressRootExitStatus === RootErrored |
1449 | 1450 | ) { |
1450 | 1451 | workInProgressRootExitStatus = RootSuspendedWithDelay; |
1451 | 1452 | } |
@@ -1469,7 +1470,7 @@ export function renderDidSuspendDelayIfPossible(): void { |
1469 | 1470 | } |
1470 | 1471 |
|
1471 | 1472 | export function renderDidError() { |
1472 | | - if (workInProgressRootExitStatus !== RootCompleted) { |
| 1473 | + if (workInProgressRootExitStatus !== RootSuspendedWithDelay) { |
1473 | 1474 | workInProgressRootExitStatus = RootErrored; |
1474 | 1475 | } |
1475 | 1476 | } |
|