Skip to content

Commit

Permalink
fix: redirectFrom query parameter not leading to the opening of a Mod…
Browse files Browse the repository at this point in the history
…al. (#650)
  • Loading branch information
kaushik-rishi authored Jun 8, 2023
1 parent 01e39d8 commit de12131
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/services/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export class ApplicationService extends AbstractService {
// subscribe to state to hide preloader
this.hidePreloader();

const { readOnly, url, base64, redirectedFrom } = this.svcs.navigationSvc.getUrlParameters();

const { readOnly, url, base64 } = this.svcs.navigationSvc.getUrlParameters();
// readOnly state should be only set to true when someone pass also url or base64 parameter
const isStrictReadonly = Boolean(readOnly && (url || base64));

Expand All @@ -30,6 +29,11 @@ export class ApplicationService extends AbstractService {
initialized: true,
});
}
}

public afterAppInit() {
const { readOnly, url, base64, redirectedFrom } = this.svcs.navigationSvc.getUrlParameters();
const isStrictReadonly = Boolean(readOnly && (url || base64));

// show RedirectedModal modal if the redirectedFrom is set (only when readOnly state is set to false)
if (!isStrictReadonly && redirectedFrom) {
Expand Down

0 comments on commit de12131

Please sign in to comment.