File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
packages/react-reconciler/src Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ import {
140
140
} from './ReactHookEffectTags' ;
141
141
import { didWarnAboutReassigningProps } from './ReactFiberBeginWork.new' ;
142
142
import { doesFiberContain } from './ReactFiberTreeReflection' ;
143
- import { invokeGuardedCallback } from 'shared/ReactErrorUtils' ;
143
+ import { invokeGuardedCallback , clearCaughtError } from 'shared/ReactErrorUtils' ;
144
144
145
145
let didWarnAboutUndefinedSnapshotBeforeUpdate : Set < mixed > | null = null ;
146
146
if ( __DEV__ ) {
@@ -171,6 +171,7 @@ function reportUncaughtErrorInDEV(error) {
171
171
invokeGuardedCallback ( null , ( ) => {
172
172
throw error ;
173
173
} ) ;
174
+ clearCaughtError ( ) ;
174
175
}
175
176
}
176
177
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ import {
140
140
} from './ReactHookEffectTags' ;
141
141
import { didWarnAboutReassigningProps } from './ReactFiberBeginWork.old' ;
142
142
import { doesFiberContain } from './ReactFiberTreeReflection' ;
143
- import { invokeGuardedCallback } from 'shared/ReactErrorUtils' ;
143
+ import { invokeGuardedCallback , clearCaughtError } from 'shared/ReactErrorUtils' ;
144
144
145
145
let didWarnAboutUndefinedSnapshotBeforeUpdate : Set < mixed > | null = null ;
146
146
if ( __DEV__ ) {
@@ -171,6 +171,7 @@ function reportUncaughtErrorInDEV(error) {
171
171
invokeGuardedCallback ( null , ( ) => {
172
172
throw error ;
173
173
} ) ;
174
+ clearCaughtError ( ) ;
174
175
}
175
176
}
176
177
You can’t perform that action at this time.
0 commit comments