mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
fix(electron): allow close pinned tab (#7732)
This commit is contained in:
@@ -10,7 +10,6 @@ import {
|
||||
|
||||
export const showTabContextMenu = async (tabId: string, viewIndex: number) => {
|
||||
const workbenches = WebContentViewsManager.instance.tabViewsMeta.workbenches;
|
||||
const unpinned = workbenches.filter(w => !w.pinned);
|
||||
const tabMeta = workbenches.find(w => w.id === tabId);
|
||||
if (!tabMeta) {
|
||||
return;
|
||||
@@ -63,7 +62,7 @@ export const showTabContextMenu = async (tabId: string, viewIndex: number) => {
|
||||
},
|
||||
},
|
||||
|
||||
...(unpinned.length > 0
|
||||
...(workbenches.length > 0
|
||||
? ([
|
||||
{ type: 'separator' },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user