Race condition maybe?

This commit is contained in:
Dennis Postma 2024-09-10 14:19:04 +02:00
parent bd65699cc5
commit 7d0a6084c5

View File

@ -62,11 +62,11 @@ export const useGameStore = defineStore('game', {
})
},
disconnectSocket() {
if (!this.connection) return
if (this.connection) this.connection.disconnect()
useCookies().remove('token')
this.connection.disconnect()
this.connection = null
this.token = null
this.user = null
this.character = null
@ -74,8 +74,6 @@ export const useGameStore = defineStore('game', {
this.isMovingCamera = false
this.isChatOpen = false
this.isUserPanelOpen = false
useCookies().remove('token')
}
}
})