Commit 54d630e4 authored by Tristan Cavelier's avatar Tristan Cavelier

jslint fixes

parent 011ac6b4
......@@ -506,7 +506,7 @@
*/
LocalStorage.prototype.genericRepair = function (command, param, repair) {
var that = this, result;
var that = this, final_result;
function referenceAttachment(param, attachment) {
if (param.referenced_attachments.indexOf(attachment) !== -1) {
......@@ -660,14 +660,14 @@
param.referenced_attachments = [];
param.unreferenced_attachments = [];
if (typeof param._id === 'string') {
result = repairOne(param, repair) || {};
final_result = repairOne(param, repair) || {};
} else {
result = repairAll(param, repair) || {};
final_result = repairAll(param, repair) || {};
}
if (result.error) {
return command.error.apply(command, result.answers || []);
if (final_result.error) {
return command.error.apply(command, final_result.answers || []);
}
command.success.apply(command, result.answers || []);
command.success.apply(command, final_result.answers || []);
};
jIO.addStorage('local', LocalStorage);
......
......@@ -333,8 +333,7 @@
var LIST_HOST = "http://rsf.qiniu.com",
LIST_PREFIX = "/list?bucket=" + this._bucket,
list_url = LIST_HOST + LIST_PREFIX,
data = LIST_PREFIX + '\n',
token = b64_hmac_sha1(this._secret_key, data);
token = b64_hmac_sha1(this._secret_key, LIST_PREFIX + '\n');
jIO.util.ajax({
"type": "POST",
......
......@@ -876,9 +876,9 @@
counter = 0;
keys.each(function () {
var that, filename, docId;
that = $(this);
filename = that.context.textContent;
var $this, filename, docId;
$this = $(this);
filename = $this.context.textContent;
docId = priv.idsToFileName(priv.fileNameToIds(filename)[0]);
if (counter === 0) {
counter += 1;
......
......@@ -189,7 +189,7 @@
{'identifier': '19', 'number': '19'},
{'identifier': '100', 'number': '100'}
];
}, key_schema = {
}, test_key_schema = {
cast_lookup: {
intType: function (value) {
if (typeof value === 'string') {
......@@ -223,7 +223,7 @@
operator: '=',
value: '19'
}]
}, key_schema).
}, test_key_schema).
exec(docList()).
then(function (dl) {
deepEqual(dl, [
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment