From b972b5eff381023a1cbf0fb7ef8fb03075a4079e Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 19 Jan 2018 14:57:27 +0200 Subject: [PATCH] refactor(dom) goToDirectory --- client/dom/index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/dom/index.js b/client/dom/index.js index cc3f75d5..67712240 100644 --- a/client/dom/index.js +++ b/client/dom/index.js @@ -1082,12 +1082,13 @@ function CmdProto() { const path = CurrentInfo.dirPath; const Dialog = DOM.Dialog; const cancel = false; - - Dialog.prompt(TITLE, msg, path, {cancel}).then((path) => { - CloudCmd.loadDir({ - path: path - }); + const setPath = (path) => ({ + path }); + + Dialog.prompt(TITLE, msg, path, {cancel}) + .then(setPath) + .then(CloudCmd.loadDir); }, this.duplicatePanel = () => {