Skip to content

Commit

Permalink
Fix history loop issue with /search
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thostetler committed Oct 21, 2020
1 parent e54ec0b commit 8eb7a0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/apps/discovery/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ define([
);
}
} else {
this.getPubSub().publish(this.getPubSub().NAVIGATE, 'index-page');
this.getPubSub().publish(this.getPubSub().NAVIGATE, 'index-page', { replace: true });
}
},

Expand Down

0 comments on commit 8eb7a0d

Please sign in to comment.