Skip to content

Commit

Permalink
feat: close overlay on 'ok' event (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
grimseal authored and gregberge committed May 5, 2019
1 parent bb98ab3 commit 1471e29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/entry-devserver.js
Expand Up @@ -3,6 +3,7 @@ import SockJS from 'sockjs-client';
import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages';
import {
reportBuildError,
dismissBuildError,
} from 'react-error-overlay'

const connection = new SockJS(
Expand All @@ -19,6 +20,9 @@ connection.onmessage = function onmessage(e) {
const {type, data} = JSON.parse(e.data);
let formatted
switch (type) {
case 'ok':
dismissBuildError();
break;
case 'errors':
formatted = formatWebpackMessages({
errors: data,
Expand Down

0 comments on commit 1471e29

Please sign in to comment.