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

jslint fixes

parent 011ac6b4
...@@ -506,7 +506,7 @@ ...@@ -506,7 +506,7 @@
*/ */
LocalStorage.prototype.genericRepair = function (command, param, repair) { LocalStorage.prototype.genericRepair = function (command, param, repair) {
var that = this, result; var that = this, final_result;
function referenceAttachment(param, attachment) { function referenceAttachment(param, attachment) {
if (param.referenced_attachments.indexOf(attachment) !== -1) { if (param.referenced_attachments.indexOf(attachment) !== -1) {
...@@ -660,14 +660,14 @@ ...@@ -660,14 +660,14 @@
param.referenced_attachments = []; param.referenced_attachments = [];
param.unreferenced_attachments = []; param.unreferenced_attachments = [];
if (typeof param._id === 'string') { if (typeof param._id === 'string') {
result = repairOne(param, repair) || {}; final_result = repairOne(param, repair) || {};
} else { } else {
result = repairAll(param, repair) || {}; final_result = repairAll(param, repair) || {};
} }
if (result.error) { if (final_result.error) {
return command.error.apply(command, result.answers || []); 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); jIO.addStorage('local', LocalStorage);
......
...@@ -333,8 +333,7 @@ ...@@ -333,8 +333,7 @@
var LIST_HOST = "http://rsf.qiniu.com", var LIST_HOST = "http://rsf.qiniu.com",
LIST_PREFIX = "/list?bucket=" + this._bucket, LIST_PREFIX = "/list?bucket=" + this._bucket,
list_url = LIST_HOST + LIST_PREFIX, list_url = LIST_HOST + LIST_PREFIX,
data = LIST_PREFIX + '\n', token = b64_hmac_sha1(this._secret_key, LIST_PREFIX + '\n');
token = b64_hmac_sha1(this._secret_key, data);
jIO.util.ajax({ jIO.util.ajax({
"type": "POST", "type": "POST",
......
...@@ -876,9 +876,9 @@ ...@@ -876,9 +876,9 @@
counter = 0; counter = 0;
keys.each(function () { keys.each(function () {
var that, filename, docId; var $this, filename, docId;
that = $(this); $this = $(this);
filename = that.context.textContent; filename = $this.context.textContent;
docId = priv.idsToFileName(priv.fileNameToIds(filename)[0]); docId = priv.idsToFileName(priv.fileNameToIds(filename)[0]);
if (counter === 0) { if (counter === 0) {
counter += 1; counter += 1;
......
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
{'identifier': '19', 'number': '19'}, {'identifier': '19', 'number': '19'},
{'identifier': '100', 'number': '100'} {'identifier': '100', 'number': '100'}
]; ];
}, key_schema = { }, test_key_schema = {
cast_lookup: { cast_lookup: {
intType: function (value) { intType: function (value) {
if (typeof value === 'string') { if (typeof value === 'string') {
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
operator: '=', operator: '=',
value: '19' value: '19'
}] }]
}, key_schema). }, test_key_schema).
exec(docList()). exec(docList()).
then(function (dl) { then(function (dl) {
deepEqual(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