Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete check in dev-server #5320

Merged
merged 1 commit into from
Sep 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions server/next-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,17 @@ export default class DevServer extends Server {

async prepare () {
await super.prepare()
if (this.hotReloader) {
await this.hotReloader.start()
}
await this.hotReloader.start()
}

async close () {
if (this.hotReloader) {
await this.hotReloader.stop()
}
await this.hotReloader.stop()
}

async run (req, res, parsedUrl) {
if (this.hotReloader) {
const {finished} = await this.hotReloader.run(req, res, parsedUrl)
if (finished) {
return
}
const {finished} = await this.hotReloader.run(req, res, parsedUrl)
if (finished) {
return
}

return super.run(req, res, parsedUrl)
Expand Down Expand Up @@ -117,8 +111,6 @@ export default class DevServer extends Server {
}

async getCompilationError (page) {
if (!this.hotReloader) return

const errors = await this.hotReloader.getCompilationErrors(page)
if (errors.length === 0) return

Expand Down