From 37611106046430a975d65f6ff6ca1002a8e6c870 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Sun, 23 Nov 2025 01:44:40 +0100 Subject: [PATCH] fix: Fixed pinned tabs not updating sometimes, b=no-bug, c=tabs --- src/zen/tabs/ZenPinnedTabsStorage.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/zen/tabs/ZenPinnedTabsStorage.mjs b/src/zen/tabs/ZenPinnedTabsStorage.mjs index 4847687cf..a407dad35 100644 --- a/src/zen/tabs/ZenPinnedTabsStorage.mjs +++ b/src/zen/tabs/ZenPinnedTabsStorage.mjs @@ -79,6 +79,7 @@ window.ZenPinnedTabsStorage = { async savePin(pin, notifyObservers = true) { // If we find the exact same pin in the cache, skip saving const existingIndex = this._saveCache.findIndex((cachedPin) => cachedPin.uuid === pin.uuid); + const copy = { ...pin }; if (existingIndex !== -1) { const existingPin = this._saveCache[existingIndex]; const isSame = Object.keys(pin).every((key) => pin[key] === existingPin[key]); @@ -86,11 +87,11 @@ window.ZenPinnedTabsStorage = { return; // No changes, skip saving } else { // Update the cached pin - this._saveCache[existingIndex] = pin; + this._saveCache[existingIndex] = { ...copy }; } } else { // Add to cache - this._saveCache.push(pin); + this._saveCache.push(copy); } const changedUUIDs = new Set();