1
0
Fork 0
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:
sauls8t 2019-01-24 15:27:50 +00:00
parent 1e217274c6
commit 278572c49b
2 changed files with 2 additions and 2 deletions

View file

@ -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();

View file

@ -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) => {