1
0
Fork 0

Really fix routing

This commit is contained in:
Alan Plum 2017-02-14 17:15:42 +01:00
parent d72be1cf74
commit 01f83c20a2
No known key found for this signature in database
GPG Key ID: 8ED72A9A323B6EFD
1 changed files with 3 additions and 4 deletions

View File

@ -2050,10 +2050,9 @@ exports.buildRouting = buildRouting;
exports.buildRoutingTree = buildRoutingTree;
exports.flattenRoutingTree = flattenRoutingTree;
exports.nextRouting = nextRouting;
exports.firstRouting = function firstRouting (method, url, routes) {
let parts = url;
if (typeof url === 'string') {
url.split('/').filter(s => s !== '');
exports.firstRouting = function firstRouting (method, parts, routes) {
if (typeof parts === 'string') {
parts = parts.split('/').filter(s => s !== '');
}
return firstRouting(method, parts, routes);
};