Skip to content

Commit

Permalink
fix: console 兼容老数据
Browse files Browse the repository at this point in the history
  • Loading branch information
shanhexi committed Dec 21, 2023
1 parent dce3501 commit 761b8c0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ const WorkspaceTabs = memo(() => {
);
data.forEach((item) => {
const editData = workspaceTabList?.find((t) => t.id === item.key);
// table 为了兼容老数据
if (editData?.type === WorkspaceTabType.CONSOLE || editData?.type === 'table' as any) {
// table 和 !editData?.type 为了兼容老数据
if (editData?.type === WorkspaceTabType.CONSOLE || editData?.type === 'table' as any || !editData?.type) {
closeWindowTab(item.key as number);
}
});
Expand Down Expand Up @@ -214,6 +214,7 @@ const WorkspaceTabs = memo(() => {
const workspaceTabConnectionMap = (item: IWorkspaceTab) => {
switch (item.type) {
case 'table' as any: // 为了兼容老数据
case null as any: // 为了兼容老数据
case WorkspaceTabType.CONSOLE:
case WorkspaceTabType.FUNCTION:
case WorkspaceTabType.PROCEDURE:
Expand Down

0 comments on commit 761b8c0

Please sign in to comment.