diff options
Diffstat (limited to 'browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs')
-rw-r--r-- | browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs b/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs index d0627180f0..ebb2a66a53 100644 --- a/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs +++ b/browser/components/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs @@ -183,9 +183,9 @@ export var RecentlyClosedTabsAndWindowsMenuUtils = { * The command event when the user clicks the restore all menu item */ onRestoreAllWindowsCommand() { - const count = lazy.SessionStore.getClosedWindowCount(); - for (let index = 0; index < count; index++) { - lazy.SessionStore.undoCloseWindow(index); + const closedData = lazy.SessionStore.getClosedWindowData(); + for (const { closedId } of closedData) { + lazy.SessionStore.undoCloseById(closedId); } }, |