Reorder constant declaration.

This commit is contained in:
Dillon Kearns 2020-04-20 15:06:58 -07:00
parent 613cc02b3c
commit b2e66174e9

View File

@ -52,14 +52,14 @@ function start({ routes, debug, customPort, manifestConfig, routesWithRequests,
const isPage = routes.includes(route);
compiler.outputFileSystem.readFile(filename, function (err, result) {
const contents = isPage
? replaceBaseAndLinks(result.toString(), route)
: result
if (err) {
return next(err);
}
const contents = isPage
? replaceBaseAndLinks(result.toString(), route)
: result
res.set("content-type", "text/html");
res.send(contents);
res.end();