Skip to content

Commit d9646f9

Browse files
committed
fix: Only add folder direct childs to the database, b=no-bug, c=tabs
1 parent 8f0292d commit d9646f9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/zen/tabs/ZenPinnedTabManager.mjs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,15 @@
447447
);
448448
group.setAttribute('zen-pin-id', id);
449449
for (const tab of group.tabs) {
450-
if (tab.pinned && tab.hasAttribute('zen-pin-id')) {
450+
// Only add it if the tab is directly under the group
451+
if (
452+
tab.pinned &&
453+
tab.hasAttribute('zen-pin-id') &&
454+
tab.group === group &&
455+
this.#hasInitializedPins
456+
) {
451457
const tabPinId = tab.getAttribute('zen-pin-id');
452-
ZenPinnedTabsStorage.addTabToGroup(tabPinId, id, /* position */ tab._pPos);
458+
await ZenPinnedTabsStorage.addTabToGroup(tabPinId, id, /* position */ tab._pPos);
453459
}
454460
}
455461
await this.refreshPinnedTabs();

0 commit comments

Comments
 (0)