diff --git a/lib/client.js b/lib/client.js index b1631ddf..7a3f1300 100644 --- a/lib/client.js +++ b/lib/client.js @@ -415,11 +415,6 @@ var Util, DOM, CloudFunc; panel = DOM.getPanel(), /* getting current element if was refresh */ path = DOM.getCurrentDirPath(panel), - - current = DOM.getCurrentFile(), - dir = DOM.getCurrentDirName(), - - name = DOM.getCurrentName(current), wasRefresh = path === json.path, funcs = [ CloudCmd.getFileTemplate, @@ -428,8 +423,10 @@ var Util, DOM, CloudFunc; ]; Util.asyncCall(funcs, function(templFile, templPath, templLink) { - var n, found, varCurrent, varName, - i = panel.childNodes.length; + var n, found, varCurrent, varName, current, + dir = DOM.getCurrentDirName(), + name = DOM.getCurrentName(), + i = panel.childNodes.length; while(i--) panel.removeChild(panel.lastChild);