Skip to content

Commit

Permalink
Make open-in-editor functionality to work with new iframe script
Browse files Browse the repository at this point in the history
  • Loading branch information
tharakawj committed Oct 4, 2017
1 parent 64ef981 commit 8d36cd9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions packages/react-error-overlay/src/iframeScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,22 @@ function render({
currentBuildError,
currentRuntimeErrorRecords,
dismissRuntimeErrors,
launchEditorEndpoint,
openInEditor,
}) {
if (currentBuildError) {
return <CompileErrorContainer error={currentBuildError} />;
return (
<CompileErrorContainer
error={currentBuildError}
openInEditor={openInEditor}
/>
);
}
if (currentRuntimeErrorRecords.length > 0) {
return (
<RuntimeErrorContainer
errorRecords={currentRuntimeErrorRecords}
close={dismissRuntimeErrors}
launchEditorEndpoint={launchEditorEndpoint}
openInEditor={openInEditor}
/>
);
}
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 @@ -153,7 +153,7 @@ function updateIframeContent() {
currentBuildError,
currentRuntimeErrorRecords,
dismissRuntimeErrors,
launchEditorEndpoint: currentRuntimeErrorOptions.launchEditorEndpoint,
openInEditor,
});

if (!isRendered) {
Expand Down

0 comments on commit 8d36cd9

Please sign in to comment.