@@ -148,11 +148,11 @@ class Router {
148
148
const queryParams = this . _qs . parse ( context . querystring ) ;
149
149
this . _current = {
150
150
path : context . path ,
151
- context : context ,
152
151
params : context . params ,
153
- queryParams : queryParams ,
154
- route : route ,
155
- oldRoute : oldRoute
152
+ route,
153
+ context,
154
+ oldRoute,
155
+ queryParams
156
156
} ;
157
157
158
158
// we need to invalidate if all the triggers have been completed
@@ -208,7 +208,7 @@ class Router {
208
208
209
209
// Prefix the path with the router global prefix
210
210
if ( this . _basePath ) {
211
- path += '/' + this . _basePath + '/' ;
211
+ path += `/ ${ this . _basePath } /` ;
212
212
}
213
213
214
214
path += pathDef . replace ( this . pathRegExp , ( _key ) => {
@@ -243,7 +243,7 @@ class Router {
243
243
244
244
const strQueryParams = this . _qs . stringify ( queryParams || { } ) ;
245
245
if ( strQueryParams ) {
246
- path += '?' + strQueryParams ;
246
+ path += `? ${ strQueryParams } ` ;
247
247
}
248
248
249
249
path = path . replace ( / \/ \/ + / g, '/' ) ;
@@ -300,7 +300,7 @@ class Router {
300
300
const queryParams = _ . clone ( this . _current . queryParams ) ;
301
301
_ . extend ( queryParams , newParams ) ;
302
302
303
- for ( let k in queryParams ) {
303
+ for ( const k in queryParams ) {
304
304
if ( queryParams [ k ] === null || queryParams [ k ] === undefined ) {
305
305
delete queryParams [ k ] ;
306
306
}
@@ -639,7 +639,7 @@ class Router {
639
639
// We need to remove the leading base path, or "/", as it will be inserted
640
640
// automatically by `Meteor.absoluteUrl` as documented in:
641
641
// http://docs.meteor.com/#/full/meteor_absoluteurl
642
- return Meteor . absoluteUrl ( this . path . apply ( this , arguments ) . replace ( new RegExp ( '^' + ( '/' + ( this . _basePath || '' ) + '/' ) . replace ( / \/ \/ + / g, '/' ) ) , '' ) ) ;
642
+ return Meteor . absoluteUrl ( this . path . apply ( this , arguments ) . replace ( new RegExp ( '^' + ( `/ ${ this . _basePath || '' } /` ) . replace ( / \/ \/ + / g, '/' ) ) , '' ) ) ;
643
643
}
644
644
}
645
645
0 commit comments