@less-is-more/less-js 1.2.27 → 1.2.28
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.
- package/package.json +1 -1
- package/src/router.js +7 -1
package/package.json
CHANGED
package/src/router.js
CHANGED
|
@@ -80,7 +80,13 @@ module.exports = class Router {
|
|
|
80
80
|
req.body = querystring.parse(decodeURIComponent(data));
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
if (req.params == undefined)
|
|
83
|
+
if (req.params == undefined) {
|
|
84
|
+
req.params = {};
|
|
85
|
+
} else {
|
|
86
|
+
// express特有的 0为路径,处理一下
|
|
87
|
+
delete req.params[0];
|
|
88
|
+
}
|
|
89
|
+
|
|
84
90
|
if (!Param.isBlank(req.queries)) {
|
|
85
91
|
Object.keys(req.queries).forEach((n) => (req.params[n] = req.queries[n]));
|
|
86
92
|
}
|