mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
fix set locations on events
This commit is contained in:
parent
9f3a538492
commit
0fa964414b
@ -95,18 +95,13 @@ class App extends React.Component {
|
||||
"new_session": async () => {
|
||||
await this.flushState()
|
||||
await this.initialization()
|
||||
|
||||
if (window.location.pathname == "/login") {
|
||||
window.app.setLocation(this.beforeLoginLocation ?? "/main")
|
||||
this.beforeLoginLocation = null
|
||||
}
|
||||
},
|
||||
"destroyed_session": async () => {
|
||||
await this.flushState()
|
||||
app.eventBus.emit("forceToLogin")
|
||||
},
|
||||
"forceToLogin": () => {
|
||||
app.setLocation("/main")
|
||||
window.app.setLocation("/main")
|
||||
app.eventBus.emit("app.createLogin")
|
||||
},
|
||||
"invalid_session": async (error) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user