Prevent a double file manager load

This commit is contained in:
Dane Everitt 2019-11-03 10:46:43 -08:00
parent 0b9c6bd21d
commit de464d35a2
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -24,7 +24,7 @@ const files: ServerFileStore = {
const contents = await loadDirectory(server.uuid, payload);
actions.setDirectory(payload);
actions.setDirectory(payload.length === 0 ? '/' : payload);
actions.setContents(contents);
}),
@ -47,7 +47,7 @@ const files: ServerFileStore = {
}),
setDirectory: action((state, payload) => {
state.directory = payload;
state.directory = payload.length === 0 ? '/' : payload;
}),
};