@midwayjs/core 3.20.19 → 3.20.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -108,7 +108,7 @@ let MidwayMiddlewareService = class MidwayMiddlewareService {
|
|
|
108
108
|
* 2、如果 result 有值(非 undefined),则不管什么情况,都会覆盖当前 body,注意,这里有可能赋值 null,导致 status 为 204,会在中间件处进行修正
|
|
109
109
|
* 3、如果 result 没值,且 ctx.body 已经赋值,则向 result 赋值
|
|
110
110
|
*/
|
|
111
|
-
if (result !== undefined) {
|
|
111
|
+
if (result !== undefined && result !== context['body']) {
|
|
112
112
|
context['body'] = result;
|
|
113
113
|
}
|
|
114
114
|
else if (context['body'] !== undefined) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/core",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.22",
|
|
4
4
|
"description": "midway core",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=12"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "ea2f0e09be0dca40302268aafa1d2bb34e634216"
|
|
47
47
|
}
|