Skip to content

Commit

Permalink
hot-reloader: return when rejected (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkzawa authored and rauchg committed Jan 8, 2017
1 parent c684262 commit 0c82d8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/hot-reloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class HotReloader {
for (const fn of this.middlewares) {
await new Promise((resolve, reject) => {
fn(req, res, (err) => {
if (err) reject(err)
if (err) return reject(err)
resolve()
})
})
Expand All @@ -47,7 +47,7 @@ export default class HotReloader {
if (this.webpackDevMiddleware) {
return new Promise((resolve, reject) => {
this.webpackDevMiddleware.close((err) => {
if (err) reject(err)
if (err) return reject(err)
resolve()
})
})
Expand Down

0 comments on commit 0c82d8a

Please sign in to comment.