Skip to content

Commit ae18e55

Browse files
committed
Fix flow errors
1 parent a0b3566 commit ae18e55

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: packages/react-error-overlay/src/containers/CompileErrorContainer.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ class CompileErrorContainer extends PureComponent<Props, void> {
3333
<ErrorOverlay>
3434
<Header headerText="Failed to compile" />
3535
<a
36-
onClick={canOpenInEditor ? () => editorHandler(errLoc) : null}
36+
onClick={
37+
canOpenInEditor && errLoc ? () => editorHandler(errLoc) : null
38+
}
3739
style={canOpenInEditor ? codeAnchorStyle : null}
3840
>
3941
<CodeBlock main={true} codeHTML={generateAnsiHTML(error)} />

Diff for: packages/react-error-overlay/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let iframe: null | HTMLIFrameElement = null;
2929
let isLoadingIframe: boolean = false;
3030
var isIframeReady: boolean = false;
3131

32-
let editorHandler: null | OpenInEditorListener = null;
32+
let editorHandler: null | EditorHandler = null;
3333
let currentBuildError: null | string = null;
3434
let currentRuntimeErrorRecords: Array<ErrorRecord> = [];
3535
let currentRuntimeErrorOptions: null | RuntimeReportingOptions = null;

0 commit comments

Comments
 (0)