Skip to content

Commit de464d3

Browse files
committed
Prevent a double file manager load
1 parent 0b9c6bd commit de464d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/scripts/state/server/files.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const files: ServerFileStore = {
2424

2525
const contents = await loadDirectory(server.uuid, payload);
2626

27-
actions.setDirectory(payload);
27+
actions.setDirectory(payload.length === 0 ? '/' : payload);
2828
actions.setContents(contents);
2929
}),
3030

@@ -47,7 +47,7 @@ const files: ServerFileStore = {
4747
}),
4848

4949
setDirectory: action((state, payload) => {
50-
state.directory = payload;
50+
state.directory = payload.length === 0 ? '/' : payload;
5151
}),
5252
};
5353

0 commit comments

Comments
 (0)