1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 02:20:54 +00:00
This commit is contained in:
astaxie 2013-10-12 16:56:30 +08:00
parent 5d55ca19be
commit e11c40eee4

View File

@ -26,8 +26,10 @@ func (mr *FilterRouter) ValidRouter(router string) bool {
return true
}
matches := mr.regex.FindStringSubmatch(router)
if len(matches[0]) == len(router) {
return true
if len(matches) > 0 {
if len(matches[0]) == len(router) {
return true
}
}
}
return false