浏览代码

fix noBypass

HonorLee 6 年之前
父节点
当前提交
44d9b2fc94
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      system/lib/core/router.js

+ 1 - 1
system/lib/core/router.js

@@ -40,7 +40,7 @@ var Router ={
             if(typeof handler[method]==='function'){
             if(typeof handler[method]==='function'){
                 let noBypass = true;
                 let noBypass = true;
                 if(typeof handler['__construct']==='function') noBypass = handler['__construct'](req,res);
                 if(typeof handler['__construct']==='function') noBypass = handler['__construct'](req,res);
-                if(noBypass) handler[method](req,res);
+                if(noBypass || noBypass===undefined) handler[method](req,res);
             }else{
             }else{
                 Router._error('Handler ['+handlerFile+'] no such method "'+method+'"',res);
                 Router._error('Handler ['+handlerFile+'] no such method "'+method+'"',res);
             }
             }