From a135007f35e9f13032f682c52051aea73644d3d5 Mon Sep 17 00:00:00 2001 From: yutent Date: Fri, 9 Dec 2022 10:40:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=98=BB=E6=AD=A2=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=BE=80=E4=B8=8B=E8=B5=B0=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- middleware/router.js | 5 ++++- package.json | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/middleware/router.js b/middleware/router.js index 29941ab..2026210 100644 --- a/middleware/router.js +++ b/middleware/router.js @@ -31,7 +31,10 @@ export default function (req, res, next) { // 4. 优先执行__main__方法 if (app.__main__) { try { - await app.__main__() + let r = await app.__main__() + if (r === false) { + return + } } catch (err) { return Promise.reject(err) } diff --git a/package.json b/package.json index 41d5147..0754838 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gm5/core", - "version": "1.1.1", + "version": "1.1.2", "type": "module", "description": "Five.js, 一个轻量级的nodejs mvc框架 旨在简单易用, 5分钟即可上手", "author": "yutent ", @@ -14,7 +14,7 @@ "@gm5/views": "^1.0.0", "crypto.js": "^2.0.2", "es.shim": "^2.0.1", - "iofs": "^1.5.0" + "iofs": "^1.5.3" }, "devDependencies": {}, "repository": {