Bug 1865154 - Add check for activeIndex in tabState.entries r=sessionstore-reviewers,sfoster
* Only add previously open tabs to the newWindowState in _prepDataForDeferredRestore if they have entries Differential Revision: https://phabricator.services.mozilla.com/D196157
This commit is contained in:
@@ -6532,6 +6532,7 @@ var SessionStoreInternal = {
|
|||||||
activeIndex = Math.min(activeIndex, tabState.entries.length - 1);
|
activeIndex = Math.min(activeIndex, tabState.entries.length - 1);
|
||||||
activeIndex = Math.max(activeIndex, 0);
|
activeIndex = Math.max(activeIndex, 0);
|
||||||
|
|
||||||
|
if (activeIndex in tabState.entries) {
|
||||||
let title =
|
let title =
|
||||||
tabState.entries[activeIndex].title ||
|
tabState.entries[activeIndex].title ||
|
||||||
tabState.entries[activeIndex].url;
|
tabState.entries[activeIndex].url;
|
||||||
@@ -6555,6 +6556,7 @@ var SessionStoreInternal = {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
tIndex++;
|
tIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user