Skip to content

Commit d538f17

Browse files
committed
fix(redirect): do not redirect to actual route
fix #265
1 parent 862bfc3 commit d538f17

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/lib/auth-vue-http.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export default class AuthVueHttp {
172172
const { interval } = this.options.fetchData;
173173
if (interval && !this.intervalFetchData) {
174174
this.intervalFetchData = setInterval(() => {
175-
this.fetchData();
175+
void this.fetchData();
176176
}, interval * this.MINUTE_IN_MS);
177177
}
178178
}
@@ -184,7 +184,7 @@ export default class AuthVueHttp {
184184
const { interval } = this.options.refreshData;
185185
if (interval && !this.intervalRefreshData) {
186186
this.intervalRefreshData = setInterval(() => {
187-
this.refresh();
187+
void this.refresh();
188188
}, interval * this.MINUTE_IN_MS);
189189
}
190190
}

src/lib/auth-vue-router.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export default class AuthVueRouter {
1717
}
1818

1919
public async push(to: RawLocation | string) {
20-
await this.router.push(to);
20+
if (this.router.currentRoute.path !== to) {
21+
await this.router.push(to);
22+
}
2123
}
2224

2325
public async afterLogin(redirect?: RawLocation | string | null) {

0 commit comments

Comments
 (0)