mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 11:15:14 +00:00
Merge pull request #105 from thgh/patch-2
Fix route not found when url is /?
This commit is contained in:
@@ -125,7 +125,7 @@ function connect_prod() {
|
||||
export default dev ? connect_dev : connect_prod;
|
||||
|
||||
function set_req_pathname(req, res, next) {
|
||||
req.pathname = req.url.replace(/\?.+/, '');
|
||||
req.pathname = req.url.replace(/\?.*/, '');
|
||||
next();
|
||||
}
|
||||
|
||||
@@ -279,4 +279,4 @@ function try_serialize(data) {
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user