diff --git a/client/client.js b/client/client.js index 3e0ecb05..600954ee 100644 --- a/client/client.js +++ b/client/client.js @@ -162,7 +162,7 @@ function CloudCmdProto(Util, DOM) { if (error || !itype.function(Proto)) return; - CloudCmd[name] = applyConstructor(Proto, args); + CloudCmd[name] = new Proto(...args); }; return DOM.load.js(pathFull, func || done); @@ -171,21 +171,6 @@ function CloudCmdProto(Util, DOM) { CloudCmd[name][funcName] = CloudCmd[name]; } - /* - * apply arguemnts to constructor - * - * @param constructor - * @param args - */ - function applyConstructor(constructor, args) { - const F = function () { - return constructor.apply(this, args); - }; - - F.prototype = constructor.prototype; - return new F(); - } - /** * Конструктор CloudClient, который * выполняет весь функционал по