File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,14 @@ export default class BrowserRouter extends Router {
5050 if ( error . message !== 'Cancelled' ) this . history . push ( path ) ;
5151 }
5252 }
53- async push ( path ) {
53+ async push ( path , ctx = new Context ( ) ) {
5454 // console.warn('Please use navigate method instead of push, it will be deprecated in future');
5555 if ( typeof path === 'string' ) {
56- await this . navigate ( path ) ;
56+ await this . navigate ( path , ctx ) ;
5757 } else {
5858 let fullPath = path . pathname ;
5959 if ( path . query ) fullPath += `?${ stringifyQuery ( path . query ) } ` ;
60- await this . navigate ( fullPath ) ;
60+ await this . navigate ( fullPath , ctx ) ;
6161 }
6262 }
6363 // TODO: maybe we need to make this history methods works through navigate?
@@ -113,4 +113,4 @@ export default class BrowserRouter extends Router {
113113 </ div >
114114 )
115115 }
116- }
116+ }
You can’t perform that action at this time.
0 commit comments