修复strict默认值问题
This commit is contained in:
@ -153,7 +153,7 @@ export class KoaRouter {
|
||||
let regexpStr = "^" + regexpItems.join("") + pathname.slice(offset);
|
||||
|
||||
//严格模式
|
||||
if (option?.strict) regexpStr += "$";
|
||||
if (option?.strict ?? true) regexpStr += "$";
|
||||
else regexpStr += "\\b";
|
||||
|
||||
//生成正则表达式
|
||||
|
Reference in New Issue
Block a user