Skip to content

Commit

Permalink
Fix flow errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tharakawj committed Oct 4, 2017
1 parent a0b3566 commit ae18e55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ class CompileErrorContainer extends PureComponent<Props, void> {
<ErrorOverlay>
<Header headerText="Failed to compile" />
<a
onClick={canOpenInEditor ? () => editorHandler(errLoc) : null}
onClick={
canOpenInEditor && errLoc ? () => editorHandler(errLoc) : null
}
style={canOpenInEditor ? codeAnchorStyle : null}
>
<CodeBlock main={true} codeHTML={generateAnsiHTML(error)} />
Expand Down
2 changes: 1 addition & 1 deletion packages/react-error-overlay/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let iframe: null | HTMLIFrameElement = null;
let isLoadingIframe: boolean = false;
var isIframeReady: boolean = false;

let editorHandler: null | OpenInEditorListener = null;
let editorHandler: null | EditorHandler = null;
let currentBuildError: null | string = null;
let currentRuntimeErrorRecords: Array<ErrorRecord> = [];
let currentRuntimeErrorOptions: null | RuntimeReportingOptions = null;
Expand Down

0 comments on commit ae18e55

Please sign in to comment.