Skip to content

Commit

Permalink
fix: update to 1.21 broke reopen last closed tabs feature (closes #307)
Browse files Browse the repository at this point in the history
  • Loading branch information
onemen committed Jul 19, 2024
1 parent 792a841 commit 0e55729
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addon/chrome/content/session/sessionStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,11 @@ var TMP_ClosedTabs = {
// aIndex is undefined if the function is called without a specific tab to restore.
let tabsToRestore = aIndex !== undefined ? [aIndex] : new Array(lastClosedTabCount).fill(0);
let multiple = tabsToRestore.length > 1;
const getClosedTabCount = Tabmix.isVersion(1150) ?
SessionStore.getClosedTabCountForWindow :
SessionStore.getClosedTabCount;
for (let index of tabsToRestore) {
if (SessionStore.getClosedTabCountForWindow(sourceWindow) > index) {
if (getClosedTabCount(sourceWindow) > index) {
tab = this._undoCloseTab(
sourceWindow,
index,
Expand Down

0 comments on commit 0e55729

Please sign in to comment.