Skip to content

Commit b5e72ea

Browse files
committed
Fix bug with logout
1 parent 8bead0f commit b5e72ea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/plugin.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,10 @@ export default async (ctx, inject) => {
167167
get isAuth() {
168168
return ctx.store.getters['common/customer/auth']
169169
},
170-
logout() {
171-
ctx.store.dispatch('common/customer/logout')
172-
ctx.router.push("/account/login");
170+
async logout() {
171+
await ctx.store.dispatch('common/customer/logout')
172+
173+
ctx.app.router.push("/account/login");
173174
},
174175
get isClient() {
175176
return process.client

0 commit comments

Comments
 (0)