This commit is contained in:
Rich Harris
2018-07-17 17:27:48 -04:00
parent 3d39ef96c2
commit 20015d6613

View File

@@ -251,7 +251,7 @@ function get_page_handler(routes: RouteObject, store_getter: (req: Req) => Store
function handle_page(page: Page, req: Req, res: ServerResponse, status = 200, error: Error | string = null) {
const get_params = page.parts[page.parts.length - 1].params || (() => ({}));
const match = page.pattern.exec(req.path);
const match = error ? null : page.pattern.exec(req.path);
req.params = error
? {}