Skip to content

Commit

Permalink
Fixed back button.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Jul 22, 2024
1 parent 907f238 commit 814c250
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/guide/Guide.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
afterNavigate(() => {
// Set the current locale.
locale = getLocaleInURL();
concept = getConceptFromURL();
const currentConcept = getConcept(concept);
// Only update the path if the concept exists and is not already in the path.
if (
Expand All @@ -81,7 +82,7 @@
path.set([currentConcept]);
}
// Only update if the path isn't already empty.
else if (currentConcept === null && $path.length !== 0) {
else if (currentConcept === undefined) {
path.set([]);
}
});
Expand Down

0 comments on commit 814c250

Please sign in to comment.