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 {
50
50
if ( error . message !== 'Cancelled' ) this . history . push ( path ) ;
51
51
}
52
52
}
53
- async push ( path ) {
53
+ async push ( path , ctx = new Context ( ) ) {
54
54
// console.warn('Please use navigate method instead of push, it will be deprecated in future');
55
55
if ( typeof path === 'string' ) {
56
- await this . navigate ( path ) ;
56
+ await this . navigate ( path , ctx ) ;
57
57
} else {
58
58
let fullPath = path . pathname ;
59
59
if ( path . query ) fullPath += `?${ stringifyQuery ( path . query ) } ` ;
60
- await this . navigate ( fullPath ) ;
60
+ await this . navigate ( fullPath , ctx ) ;
61
61
}
62
62
}
63
63
// TODO: maybe we need to make this history methods works through navigate?
@@ -113,4 +113,4 @@ export default class BrowserRouter extends Router {
113
113
</ div >
114
114
)
115
115
}
116
- }
116
+ }
You can’t perform that action at this time.
0 commit comments