From 0dc0b3e74abb6488ae075b72e204e7d1b812e40c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 2 Dec 2013 10:28:23 +0000 Subject: [PATCH] fix(dom) getDataFromStorage: never return hash --- lib/client/dom.js | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/lib/client/dom.js b/lib/client/dom.js index 53b47dae..95d4f0e0 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -1835,21 +1835,15 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; if (!allowed || isDir) Util.exec(callback); - else { - hash = Storage.get(nameHash); - - if (!hash) - Util.exec(callback); - else - DOM.checkStorageHash(name, function(error, equal, hash) { - var data; - - if (!error && equal) - data = Storage.get(nameData, data); - - Util.exec(callback, data, hash); - }); - } + else + DOM.checkStorageHash(name, function(error, equal, hash) { + var data; + + if (!error && equal) + data = Storage.get(nameData, data); + + Util.exec(callback, data, hash); + }); }); };