From 8e586d3d092454b56acb145aee1dc9259aabbcd4 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Feb 2013 08:13:45 -0500 Subject: [PATCH] minor changes --- lib/client.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/client.js b/lib/client.js index 3ec032d4..43aad27e 100644 --- a/lib/client.js +++ b/lib/client.js @@ -601,12 +601,8 @@ CloudCmd._createFileTable = function(pElem, pJSON){ var lElem = DOM.getById(pElem), /* getting current element if was refresh */ lPath = DOM.getByClass('path', lElem), - lWasRefresh_b = lPath[0].textContent === pJSON[0].path, - lCurrent; + lWasRefresh_b = lPath[0].textContent === pJSON[0].path; - if(lWasRefresh_b) - lCurrent = DOM.getCurrentFile(); - /* говорим построителю, * что бы он в нужный момент * выделил строку с первым файлом @@ -621,7 +617,8 @@ CloudCmd._createFileTable = function(pElem, pJSON){ lElem.innerHTML = CloudFunc.buildFromJSON(pJSON, true); /* searching current file */ - if(lWasRefresh_b && lCurrent){ + if(lWasRefresh_b){ + var lCurrent = DOM.getCurrentFile(); for(i = 0; i < lElem.childNodes.length; i++) if(lElem.childNodes[i].textContent === lCurrent.textContent){ lCurrent = lElem.childNodes[i];