@koa/router 9.3.1 → 9.4.0

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.
Files changed (2) hide show
  1. package/lib/router.js +1 -1
  2. package/package.json +1 -1
package/lib/router.js CHANGED
@@ -362,7 +362,7 @@ Router.prototype.routes = Router.prototype.middleware = function () {
362
362
  layerChain = matchedLayers.reduce(function(memo, layer) {
363
363
  memo.push(function(ctx, next) {
364
364
  ctx.captures = layer.captures(path, ctx.captures);
365
- ctx.params = layer.params(path, ctx.captures, ctx.params);
365
+ ctx.params = ctx.request.params = layer.params(path, ctx.captures, ctx.params);
366
366
  ctx.routerPath = layer.path;
367
367
  ctx.routerName = layer.name;
368
368
  ctx._matchedRoute = layer.path;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@koa/router",
3
3
  "description": "Router middleware for koa. Provides RESTful resource routing.",
4
- "version": "9.3.1",
4
+ "version": "9.4.0",
5
5
  "author": "Alex Mingoia <talk@alexmingoia.com>",
6
6
  "bugs": {
7
7
  "url": "https://github.com/koajs/router/issues",