From 8eb7a0d93d270a08738135c3b5dd729d346f49a8 Mon Sep 17 00:00:00 2001 From: Tim Hostetler <6970899+thostetler@users.noreply.github.com> Date: Tue, 20 Oct 2020 23:36:59 -0400 Subject: [PATCH] Fix history loop issue with /search When an error occurs on the route /search, it defaults back to index page. But this error will happen with any bare (no params) search, so you can get into a loop where the back button is constantly re-pushing the index-page. This now replaces the history entry on error, which should fix it. --- src/js/apps/discovery/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/apps/discovery/router.js b/src/js/apps/discovery/router.js index e41147ef6..80f1d72ce 100644 --- a/src/js/apps/discovery/router.js +++ b/src/js/apps/discovery/router.js @@ -126,7 +126,7 @@ define([ ); } } else { - this.getPubSub().publish(this.getPubSub().NAVIGATE, 'index-page'); + this.getPubSub().publish(this.getPubSub().NAVIGATE, 'index-page', { replace: true }); } },