From 531be839c9bb8a54a2e8f60b21df8b15d8a7a672 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Fri, 6 Feb 2026 14:04:04 +0100 Subject: [PATCH] fix: Fixed frozen window when restore split data is null, b=closes #12260, c=no-component --- src/zen/sessionstore/ZenSessionManager.sys.mjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/zen/sessionstore/ZenSessionManager.sys.mjs b/src/zen/sessionstore/ZenSessionManager.sys.mjs index 345cad0da..3bd8ce3d7 100644 --- a/src/zen/sessionstore/ZenSessionManager.sys.mjs +++ b/src/zen/sessionstore/ZenSessionManager.sys.mjs @@ -566,6 +566,7 @@ export class nsZenSessionManager { // If we should only sync the pinned tabs, we should only edit the unpinned // tabs in the window data and keep the pinned tabs from the window data, // as they should be the same as the ones in the sidebar. + sidebar.splitViewData = null; if (lazy.gSyncOnlyPinnedTabs) { let pinnedTabs = (sidebar.tabs || []).filter((tab) => tab.pinned); let unpinedWindowTabs = (aWindowData.tabs || []).filter((tab) => !tab.pinned); @@ -573,10 +574,13 @@ export class nsZenSessionManager { // We restore ALL the split view data in the sidebar, if the group doesn't exist in the window, // it should be a no-op anyways. - aWindowData.splitViewData = [...sidebar.splitViewData, ...aWindowData.splitViewData]; + aWindowData.splitViewData = [ + ...(sidebar.splitViewData || []), + ...(aWindowData.splitViewData || []), + ]; // Same thing with groups, we restore all the groups from the sidebar, if they don't have any // existing tabs in the window, they should be a no-op. - aWindowData.groups = [...sidebar.groups, ...aWindowData.groups]; + aWindowData.groups = [...(sidebar.groups || []), ...(aWindowData.groups || [])]; } else { aWindowData.tabs = sidebar.tabs || []; aWindowData.splitViewData = sidebar.splitViewData;