fix index route

This commit is contained in:
Rich Harris
2017-12-31 16:04:54 -05:00
parent 423e02aeae
commit a7024b3806

View File

@@ -31,7 +31,7 @@ module.exports = function create_matchers(files) {
}
}
const pattern = new RegExp(`^${pattern_string}$`);
const pattern = new RegExp(`^${pattern_string || '\\/'}$`);
const test = url => pattern.test(url);
@@ -41,7 +41,7 @@ module.exports = function create_matchers(files) {
const params = {};
dynamic.forEach((param, i) => {
params[param] = match[i + 1] || null;
params[param] = match[i + 1];
});
return params;