Skip to content

Commit

Permalink
clear console before accepting updates, not after (#1366)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper De Moor authored and devongovett committed May 16, 2018
1 parent e7df99d commit 08f9389
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builtins/hmr-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
var data = JSON.parse(event.data);

if (data.type === 'update') {
console.clear();

data.assets.forEach(function (asset) {
hmrApply(global.parcelRequire, asset);
});
Expand All @@ -39,8 +41,6 @@ if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
hmrAccept(global.parcelRequire, asset.id);
}
});
// Clear the console after HMR
console.clear();
}

if (data.type === 'reload') {
Expand Down

0 comments on commit 08f9389

Please sign in to comment.