parent
1e08003ba7
commit
5136605322
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "wkitd",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.2",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
"files": [
|
||||
|
|
|
@ -64,7 +64,7 @@ class Router {
|
|||
|
||||
re = route.path.replace(
|
||||
RULE_REGEXP,
|
||||
function (m, _prefix, _var, _require) {
|
||||
function (m, _prefix, _var, _require = '') {
|
||||
vars.push(_var.slice(1))
|
||||
if (_prefix === '/') {
|
||||
_prefix = '/?'
|
||||
|
@ -116,6 +116,7 @@ class Router {
|
|||
}
|
||||
|
||||
for (let [k, route] of this.#tables) {
|
||||
console.log(route, path.match(route.regexp))
|
||||
let args = path.match(route.regexp)
|
||||
if (args) {
|
||||
let params = Object.create(null)
|
||||
|
|
Loading…
Reference in New Issue