File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,15 @@ export class UmbAppElement extends UmbLitElement {
195
195
}
196
196
197
197
#redirect( ) {
198
+ const pathname = pathWithoutBasePath ( { start : true , end : false } ) ;
199
+
200
+ // If we are on the oauth_complete or error page, we should not redirect
201
+ if ( pathname === '/oauth_complete' || pathname === '/error' ) {
202
+ // Initialize the router
203
+ history . replaceState ( null , '' , location . href ) ;
204
+ return ;
205
+ }
206
+
198
207
switch ( this . #serverConnection?. getStatus ( ) ) {
199
208
case RuntimeLevelModel . INSTALL :
200
209
history . replaceState ( null , '' , 'install' ) ;
@@ -209,8 +218,6 @@ export class UmbAppElement extends UmbLitElement {
209
218
break ;
210
219
211
220
case RuntimeLevelModel . RUN : {
212
- const pathname = pathWithoutBasePath ( { start : true , end : false } ) ;
213
-
214
221
// If we are on installer or upgrade page, redirect to the root since we are in the RUN state
215
222
if ( pathname === '/install' || pathname === '/upgrade' ) {
216
223
history . replaceState ( null , '' , '/' ) ;
You can’t perform that action at this time.
0 commit comments