Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/fix-delete-task-bug' into fix-de…
Browse files Browse the repository at this point in the history
…lete-task-bug
  • Loading branch information
Zzm0809 committed Dec 21, 2023
2 parents 75c5300 + 14758d6 commit 375bbb6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ import {
import JobModal from '@/pages/DataStudio/LeftContainer/Project/JobModal';
import JobTree from '@/pages/DataStudio/LeftContainer/Project/JobTree';
import {
DataStudioParams, DataStudioTabsItemType,
DataStudioParams,
DataStudioTabsItemType,
StateType,
STUDIO_MODEL,
STUDIO_MODEL_ASYNC
Expand Down Expand Up @@ -281,7 +282,7 @@ const Project: React.FC = (props: connect) => {
await handleRemoveById(API_CONSTANTS.DELETE_CATALOGUE_BY_ID_URL, key, () => {
const currentTabs = getTabByTaskId(panes, key) as DataStudioTabsItemType;
dispatch({ type: STUDIO_MODEL.removeTag, payload: taskId });
const previousTabs = panes[panes.length> 1 ? panes.length - 1 :0];
const previousTabs = panes[panes.length > 1 ? panes.length - 1 : 0];
const { key: currentKey } = currentTabs;
if (currentKey === activeKey && panes.length >= 1) {
dispatch({ type: STUDIO_MODEL.updateTabsActiveKey, payload: previousTabs?.key });
Expand Down

0 comments on commit 375bbb6

Please sign in to comment.