Skip to content

Commit 478ddb4

Browse files
committed
getSelectedFile fix
1 parent a904b1e commit 478ddb4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/state/features/structure/utils/getFileTree.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ const updateFileContents = (id: string, content: string) => {
4545
};
4646

4747
const getSelectedFile = () => {
48-
const selectedTab = store.getState().tabs.selected;
49-
if (selectedTab === "") {
50-
return store.getState().structure.selected;
51-
}
52-
return selectedTab;
48+
return store.getState().tabs.selected;
5349
};
5450

5551
export { getFileTree, updateFileContents, getSelectedFile };

0 commit comments

Comments
 (0)