Skip to content

Commit abad339

Browse files
authored
Merge pull request #147 from parteekcoder/close-fix
fixes Close error
2 parents ef2cd34 + 0c062d3 commit abad339

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/component/TabBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ 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) {
19+
if (!superState.curGraphIndex && superState.graphs.length === 0) {
2020
dispatcher({ type: T.SET_CUR_INSTANCE, payload: null });
2121
}
2222
};

0 commit comments

Comments
 (0)