Skip to content

Commit 4783b68

Browse files
committed
Ensure there's errors
Fixes facebook#2231
1 parent af7fbae commit 4783b68

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-error-overlay/src/overlay.js

+4
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ function renderErrorByIndex(index: number) {
110110
}
111111

112112
function switchError(offset) {
113+
if (errorReferences.length < 1) {
114+
return;
115+
}
116+
113117
let nextView = currReferenceIndex + offset;
114118

115119
if (nextView < 0) {

0 commit comments

Comments
 (0)