We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29e1169 commit 7e46974Copy full SHA for 7e46974
packages/react/src/ReactLazy.js
@@ -20,6 +20,8 @@ import {enableAsyncDebugInfo} from 'shared/ReactFeatureFlags';
20
21
import {REACT_LAZY_TYPE} from 'shared/ReactSymbols';
22
23
+import noop from 'shared/noop';
24
+
25
const Uninitialized = -1;
26
const Pending = 0;
27
const Resolved = 1;
@@ -140,6 +142,8 @@ function lazyInitializer<T>(payload: Payload<T>): T {
140
142
// Mark the end time of when we rejected.
141
143
// $FlowFixMe[cannot-write]
144
ioInfo.end = performance.now();
145
+ // Hide unhandled rejections.
146
+ ioInfo.value.then(noop, noop);
147
rejectDebugValue(error);
148
// $FlowFixMe
149
ioInfo.value.status = 'rejected';
0 commit comments