File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -18,26 +18,26 @@ export default class AuthVueRouter {
1818
1919 public async push ( to : RawLocation | string ) {
2020 if ( this . router . currentRoute . path !== to ) {
21- await this . router . push ( to ) ;
21+ return await this . router . push ( to ) ;
2222 }
2323 }
2424
2525 public async afterLogin ( redirect ?: RawLocation | string | null ) {
2626 let promise : Promise < Route | undefined > = Promise . resolve ( undefined ) ;
2727 if ( redirect ) {
28- promise = this . router . push ( redirect ) ;
28+ promise = this . push ( redirect ) ;
2929 } else if ( this . router . currentRoute . query . nextUrl ) {
3030 const nextUrl = this . router . currentRoute . query . nextUrl ;
3131 if ( typeof nextUrl === 'string' ) {
32- promise = this . router . push ( nextUrl ) ;
32+ promise = this . push ( nextUrl ) ;
3333 }
3434 } else {
35- promise = this . router . push ( '/' ) ;
35+ promise = this . push ( '/' ) ;
3636 }
3737 if ( promise ) {
3838 promise . catch ( async ( ) => {
3939 const result = redirect || '/' ;
40- await this . router . push ( result ) ;
40+ await this . push ( result ) ;
4141 } ) ;
4242 }
4343 return promise ;
You can’t perform that action at this time.
0 commit comments