From c2c66fb29f4985f5c1811c0c670fffe2bbba21cd Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 6 Oct 2017 15:48:27 +0300 Subject: [PATCH] fix(operation) delete: check no files after ask --- client/modules/operation/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/modules/operation/index.js b/client/modules/operation/index.js index b3f107e0..92e70e76 100644 --- a/client/modules/operation/index.js +++ b/client/modules/operation/index.js @@ -310,6 +310,11 @@ function OperationProto(operation, data) { * @currentFile */ function promptDelete() { + let name = Info.name; + + if (name === '..') + return Dialog.alert.noFiles(TITLE); + const msgAsk = 'Do you really want to delete the '; const msgSel = 'selected '; @@ -341,9 +346,6 @@ function OperationProto(operation, data) { msg = msgAsk + msgSel + type + name + '?'; } - if (name === '..') - return Dialog.alert.noFiles(TITLE); - const cancel = false; Dialog.confirm(TITLE, msg, {cancel}).then(() => {