From 0d7f4a8deb4c287e7cbbaf8f933769bc791366cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Thu, 7 Oct 2021 02:40:11 +0800 Subject: [PATCH] Add route info to ReplayPoint while routing --- net/Router.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/Router.js b/net/Router.js index 0d0675f..81e4264 100644 --- a/net/Router.js +++ b/net/Router.js @@ -20,6 +20,7 @@ class RelayPoint typeof internal !== 'undefined' ? internal : false ); + this.route = null; this.value = internal ? uri : stripURI( uri ); this.params = Array.prototype.slice.call( arguments, 2 ); } @@ -108,6 +109,7 @@ class Router extends EventEmitter setRoute( _route, _match ) { var _self = this; + this.relaying.route = _route; this.routeObj = { route: _route , match: _match