forked from EVOgeek/Vmeda.Online
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.
|
// Redirect to non-site path.
|
||||||
const route = Router.parseUrl(redirect.page);
|
const route = Router.parseUrl(redirect.page);
|
||||||
|
route.queryParams = redirect.options?.params || {};
|
||||||
route.queryParams = {
|
|
||||||
redirectPath: redirect.page,
|
|
||||||
redirectOptions: redirect.options,
|
|
||||||
} as CoreRedirectPayload;
|
|
||||||
|
|
||||||
return route;
|
return route;
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,14 +201,6 @@ export class CoreNavigatorService {
|
||||||
const siteId = options.siteId ?? CoreSites.getCurrentSiteId();
|
const siteId = options.siteId ?? CoreSites.getCurrentSiteId();
|
||||||
const navigationOptions: CoreNavigationOptions = CoreObject.without(options, ['siteId']);
|
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 we are logged into a different site, log out first.
|
||||||
if (CoreSites.isLoggedIn() && CoreSites.getCurrentSiteId() !== siteId) {
|
if (CoreSites.isLoggedIn() && CoreSites.getCurrentSiteId() !== siteId) {
|
||||||
if (CoreSitePlugins.hasSitePluginsLoaded) {
|
if (CoreSitePlugins.hasSitePluginsLoaded) {
|
||||||
|
@ -223,6 +215,14 @@ export class CoreNavigatorService {
|
||||||
await CoreSites.logout();
|
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 we are not logged into the site, load the site.
|
||||||
if (!CoreSites.isLoggedIn()) {
|
if (!CoreSites.isLoggedIn()) {
|
||||||
const modal = await CoreDomUtils.showModalLoading();
|
const modal = await CoreDomUtils.showModalLoading();
|
||||||
|
|
Loading…
Reference in New Issue