Skip to content

Commit

Permalink
Merge pull request #196 from ukhsa-collaboration/bug/OOC-4337-fix-bac…
Browse files Browse the repository at this point in the history
…k-navigation

OOC-4337 fix back navigation
  • Loading branch information
kathryn-dale authored Jun 24, 2024
2 parents 4d8cef3 + af79af3 commit dd9805b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ export class PageControllerBase {
* used for when a user clicks the "back" link. Progress is stored in the state. This is a safer alternative to running javascript that pops the history `onclick`.
*/
const lastVisited = progress[progress.length - 1];
if (!lastVisited || !lastVisited.startsWith(currentPath)) {
if (!lastVisited || lastVisited !== currentPath) {
if (progress[progress.length - 2] === currentPath) {
progress.pop();
} else {
Expand Down

0 comments on commit dd9805b

Please sign in to comment.