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 {
140140} from './ReactHookEffectTags' ;
141141import { didWarnAboutReassigningProps } from './ReactFiberBeginWork.new' ;
142142import { doesFiberContain } from './ReactFiberTreeReflection' ;
143- import { invokeGuardedCallback } from 'shared/ReactErrorUtils' ;
143+ import { invokeGuardedCallback , clearCaughtError } from 'shared/ReactErrorUtils' ;
144144
145145let didWarnAboutUndefinedSnapshotBeforeUpdate : Set < mixed > | null = null ;
146146if ( __DEV__ ) {
@@ -171,6 +171,7 @@ function reportUncaughtErrorInDEV(error) {
171171 invokeGuardedCallback ( null , ( ) => {
172172 throw error ;
173173 } ) ;
174+ clearCaughtError ( ) ;
174175 }
175176}
176177
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ import {
140140} from './ReactHookEffectTags' ;
141141import { didWarnAboutReassigningProps } from './ReactFiberBeginWork.old' ;
142142import { doesFiberContain } from './ReactFiberTreeReflection' ;
143- import { invokeGuardedCallback } from 'shared/ReactErrorUtils' ;
143+ import { invokeGuardedCallback , clearCaughtError } from 'shared/ReactErrorUtils' ;
144144
145145let didWarnAboutUndefinedSnapshotBeforeUpdate : Set < mixed > | null = null ;
146146if ( __DEV__ ) {
@@ -171,6 +171,7 @@ function reportUncaughtErrorInDEV(error) {
171171 invokeGuardedCallback ( null , ( ) => {
172172 throw error ;
173173 } ) ;
174+ clearCaughtError ( ) ;
174175 }
175176}
176177
You can’t perform that action at this time.
0 commit comments