Skip to content

Commit

Permalink
Do not try to return to last page if there is no last page stored
Browse files Browse the repository at this point in the history
  • Loading branch information
solymosi committed Aug 23, 2024
1 parent 9ad1c7e commit 781bba1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/backToLastPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ function lastPageInit() {
initLastPageCheckbox();
loadLastPageSetting();
} else {
if (window.location.href.endsWith("main.aspx") && storage.get("newLogin", utils.getDomain())) {
if (
window.location.href.endsWith("main.aspx") &&
storage.get("newLogin", utils.getDomain()) &&
storage.get("lastPage", utils.getDomain())
) {
storage.set("newLogin", utils.getDomain(), false);
if (!storage.getForUser("lastPage").includes("ctrl=inbox")) {
window.location.href = storage.getForUser("lastPage");
Expand Down

0 comments on commit 781bba1

Please sign in to comment.