Skip to content

Commit 92e5d1f

Browse files
authored
Merge pull request #1 from Hanse/patch-1
Rename componentDidError to componentDidCatch
2 parents 0ec2bfa + fed05e0 commit 92e5d1f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ErrorBoundary.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ class ErrorBoundary extends Component {
3737

3838
unstable_handleError(error: Error, info: ErrorInfo):void {
3939
// This method is a fallback for react <= 16.0.0-alpha.13
40-
this.componentDidError(error, info);
40+
this.componentDidCatch(error, info);
4141
}
4242

43-
componentDidError(error: Error, info: ErrorInfo):void {
43+
componentDidCatch(error: Error, info: ErrorInfo):void {
4444
const {onError} = this.props;
4545

4646
if (typeof onError === 'function') {
@@ -66,4 +66,4 @@ class ErrorBoundary extends Component {
6666
}
6767
}
6868

69-
export default ErrorBoundary;
69+
export default ErrorBoundary;

0 commit comments

Comments
 (0)