fix(dom) getDataFromStorage: never return hash

This commit is contained in:
coderaiser 2013-12-02 10:28:23 +00:00
parent 0d93310338
commit 0dc0b3e74a

View file

@ -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);
});
});
};