We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9120f6c commit a2fa6ebCopy full SHA for a2fa6eb
packages/react-reconciler/src/ReactFiberLazyComponent.js
@@ -47,7 +47,6 @@ export function readLazyComponentType<T>(lazyComponent: LazyComponent<T>): T {
47
lazyComponent._status = Pending;
48
const ctor = lazyComponent._ctor;
49
const thenable = ctor();
50
- lazyComponent._result = thenable;
51
thenable.then(
52
moduleObject => {
53
if (lazyComponent._status === Pending) {
@@ -78,6 +77,7 @@ export function readLazyComponentType<T>(lazyComponent: LazyComponent<T>): T {
78
77
if (lazyComponent._status === Resolved) {
79
return lazyComponent._result;
80
}
+ lazyComponent._result = thenable;
81
throw thenable;
82
83
0 commit comments