MOBILE-3846 core: Fix redirect to a NO_SITE page
parent
9c3251ec1d
commit
83d5282852
|
@ -76,11 +76,7 @@ export class CoreRedirectGuard implements CanLoad, CanActivate {
|
|||
|
||||
// Redirect to non-site path.
|
||||
const route = Router.parseUrl(redirect.page);
|
||||
|
||||
route.queryParams = {
|
||||
redirectPath: redirect.page,
|
||||
redirectOptions: redirect.options,
|
||||
} as CoreRedirectPayload;
|
||||
route.queryParams = redirect.options?.params || {};
|
||||
|
||||
return route;
|
||||
}
|
||||
|
|
|
@ -201,14 +201,6 @@ export class CoreNavigatorService {
|
|||
const siteId = options.siteId ?? CoreSites.getCurrentSiteId();
|
||||
const navigationOptions: CoreNavigationOptions = CoreObject.without(options, ['siteId']);
|
||||
|
||||
// If the path doesn't belong to a site, call standard navigation.
|
||||
if (siteId === CoreConstants.NO_SITE_ID) {
|
||||
return this.navigate(path, {
|
||||
...navigationOptions,
|
||||
reset: true,
|
||||
});
|
||||
}
|
||||
|
||||
// If we are logged into a different site, log out first.
|
||||
if (CoreSites.isLoggedIn() && CoreSites.getCurrentSiteId() !== siteId) {
|
||||
if (CoreSitePlugins.hasSitePluginsLoaded) {
|
||||
|
@ -223,6 +215,14 @@ export class CoreNavigatorService {
|
|||
await CoreSites.logout();
|
||||
}
|
||||
|
||||
// If the path doesn't belong to a site, call standard navigation.
|
||||
if (siteId === CoreConstants.NO_SITE_ID) {
|
||||
return this.navigate(path, {
|
||||
...navigationOptions,
|
||||
reset: true,
|
||||
});
|
||||
}
|
||||
|
||||
// If we are not logged into the site, load the site.
|
||||
if (!CoreSites.isLoggedIn()) {
|
||||
const modal = await CoreDomUtils.showModalLoading();
|
||||
|
|
Loading…
Reference in New Issue