mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
Use transition.to for query params
This commit is contained in:
parent
1e217274c6
commit
278572c49b
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ export default Route.extend({
|
|||
return new EmberPromise((resolve) => {
|
||||
let constants = this.get('constants');
|
||||
|
||||
this.set('mode', is.not.undefined(transition.queryParams.mode) ? transition.queryParams.mode : 'reject');
|
||||
this.set('mode', is.not.undefined(transition.to.queryParams.mode) ? transition.to.queryParams.mode : 'reject');
|
||||
|
||||
if (this.get('mode') === 'reject' || this.get('appMeta.authProvider') !== constants.AuthProvider.Keycloak) {
|
||||
resolve();
|
||||
|
|
|
@ -24,7 +24,7 @@ export default Route.extend(AuthenticatedRouteMixin, {
|
|||
|
||||
beforeModel(transition) {
|
||||
// Note the source that sent user to this document.
|
||||
let source = transition.queryParams.source;
|
||||
let source = transition.to.queryParams.source;
|
||||
if (is.null(source) || is.undefined(source)) source = "";
|
||||
|
||||
return new EmberPromise((resolve) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue