Skip to content

Commit 17d595b

Browse files
committed
feat: Don't make unecesary writes to disk for pinned tabs, b=no-bug, c=tabs
1 parent 20bbc36 commit 17d595b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/zen/tabs/ZenPinnedTabManager.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,10 @@
778778
return;
779779
}
780780
const existingPin = this._pinsCache.find((p) => p.uuid === pin.uuid);
781+
if (existingPin && existingPin === pin) {
782+
// We want to avoid unnecessary writes
783+
return;
784+
}
781785
if (existingPin) {
782786
Object.assign(existingPin, pin);
783787
} else {

0 commit comments

Comments
 (0)