From 9d37af42df69dff533071528c79d185f37df47b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Guti=C3=A9rrez?= Date: Sat, 4 Jun 2022 20:37:49 -0600 Subject: [PATCH] Include optional rest segment for app route --- src/js/lib/monster.routing.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/js/lib/monster.routing.js b/src/js/lib/monster.routing.js index 609301273..d749b2dc8 100644 --- a/src/js/lib/monster.routing.js +++ b/src/js/lib/monster.routing.js @@ -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