From 0fa964414b89a8ba621c837ae8939aa85c0faca9 Mon Sep 17 00:00:00 2001 From: srgooglo Date: Wed, 1 Jun 2022 20:19:02 +0200 Subject: [PATCH] fix set locations on events --- packages/app/src/App.jsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/app/src/App.jsx b/packages/app/src/App.jsx index cbf60420..34a95038 100644 --- a/packages/app/src/App.jsx +++ b/packages/app/src/App.jsx @@ -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) => {