Skip to content

Commit

Permalink
Include optional rest segment for app route
Browse files Browse the repository at this point in the history
  • Loading branch information
guillegr123 committed Jun 5, 2022
1 parent fb40f70 commit 9d37af4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/js/lib/monster.routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,17 @@ define(function(require) {
},

addDefaultRoutes: function() {
this.add('apps/{appName}:?query:', function(appName, query) {
this.add('apps/{appName}/:rest*::?query:', function(appName, _rest, query) {
// not logged in, do nothing to preserve potentially valid route to load after successful login
if (!monster.util.isLoggedIn()) {
return;
}

// Do not reload app if it is already loaded (just the rest segment or the query has changed)
if (monster.apps.getActiveApp() === appName) {
return;
}

var availableApps = monster.util.listAppStoreMetadata('user');

// try loading the requested app
Expand Down

0 comments on commit 9d37af4

Please sign in to comment.