Skip to content

Commit

Permalink
fix: only try to open last visited budget if none is specified
Browse files Browse the repository at this point in the history
Signed-off-by: rare-magma <[email protected]>
  • Loading branch information
rare-magma committed Aug 27, 2024
1 parent 86592b0 commit 524bf13
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
<link rel="apple-touch-icon" href="/favicon.svg" />
<link rel="manifest" href="/manifest.json" />
<script>
const lastOpenedBudget = localStorage.getItem("guitos_lastOpenedBudget");
if (lastOpenedBudget) {
window.location.href = lastOpenedBudget
if (window.location.pathname === "/") {
const lastOpenedBudget = localStorage.getItem("guitos_lastOpenedBudget");
if (lastOpenedBudget) {
window.location.pathname = `/${lastOpenedBudget}`
}
}
</script>

Expand Down

0 comments on commit 524bf13

Please sign in to comment.