From e5c33037e5d65d4d0bf7c00d9699f1bcb72c6d13 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 8 Jan 2020 14:54:57 +0200 Subject: [PATCH] refactor(client) initModules: simplify key init --- client/client.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/client/client.js b/client/client.js index 6a11b787..18f9755d 100644 --- a/client/client.js +++ b/client/client.js @@ -38,7 +38,6 @@ load.addErrorListener((e, src) => { }); function CloudCmdProto(DOM) { - let Key; let Listeners; const log = (...a) => { @@ -206,19 +205,8 @@ function CloudCmdProto(DOM) { }; const initModules = async () => { - exec.if(CloudCmd.Key, () => { - Key = new CloudCmd.Key(); - CloudCmd.Key = Key; - Key.bind(); - }, (func) => { - /* привязываем клавиши к функциям */ - const path = 'key.js'; - - loadModule({ - path, - func, - }); - }); + CloudCmd.Key = new CloudCmd.Key(); + CloudCmd.Key.bind(); const [, modules] = await tryToCatch(Files.get, 'modules'); const showLoad = Images.show.load;