From de464d35a23943e9e165c627f0bbff39d557186f Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 3 Nov 2019 10:46:43 -0800 Subject: [PATCH] Prevent a double file manager load --- resources/scripts/state/server/files.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/scripts/state/server/files.ts b/resources/scripts/state/server/files.ts index cae75623c..85fe271a7 100644 --- a/resources/scripts/state/server/files.ts +++ b/resources/scripts/state/server/files.ts @@ -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; }), };