Merge branch 'html' of https://github.com/akihikodaki/sapper into akihikodaki-html

This commit is contained in:
Richard Harris
2019-04-27 10:47:49 -04:00

View File

@@ -329,14 +329,12 @@ export function get_page_handler(
return; return;
} }
if (!server_routes.some(route => route.pattern.test(req.path))) {
for (const page of pages) { for (const page of pages) {
if (page.pattern.test(req.path)) { if (page.pattern.test(req.path)) {
handle_page(page, req, res); handle_page(page, req, res);
return; return;
} }
} }
}
handle_error(req, res, 404, 'Not found'); handle_error(req, res, 404, 'Not found');
}; };