Skip to content

Commit 0ba928a

Browse files
authored
Merge pull request #95 from Rahuljagwani/main
#94 solved
2 parents 27e9773 + a778f9d commit 0ba928a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/component/TabBar.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ const TabBar = ({ superState, dispatcher }) => {
1616
if (!window.confirm('Do you confirm to close the tab? This action is irreversable.')) return;
1717
localStorageManager.remove(superState.graphs[i] ? superState.graphs[i].graphID : null);
1818
dispatcher({ type: T.REMOVE_GRAPH, payload: i });
19+
if (!superState.curGraphIndex) {
20+
dispatcher({ type: T.SET_CUR_INSTANCE, payload: null });
21+
}
1922
};
2023
const editCur = (e) => {
2124
e.stopPropagation();

0 commit comments

Comments
 (0)