Commit 4aa32a41 authored by Romain Courteaud's avatar Romain Courteaud

JSLint: do not redefine the same variable

parent 22d754ee
......@@ -140,8 +140,9 @@
that._key, buf);
})
.push(function (coded) {
var blob = new Blob([initializaton_vector, coded], {type: MIME_TYPE});
return that._sub_storage.putAttachment(id, name, blob);
var final_blob = new Blob([initializaton_vector, coded],
{type: MIME_TYPE});
return that._sub_storage.putAttachment(id, name, final_blob);
});
};
......
......@@ -185,7 +185,7 @@
var i,
attachment = {},
id,
new_id,
attachment_list = new DOMParser().parseFromString(
response.target.responseText,
"text/xml"
......@@ -196,11 +196,11 @@
// exclude parent folder and browse
for (i = 1; i < attachment_list.length; i += 1) {
// XXX Only get files for now
id = attachment_list[i].querySelector("D\\:href, href").
new_id = attachment_list[i].querySelector("D\\:href, href").
textContent.split('/').slice(-1)[0];
// XXX Ugly
if ((id !== undefined) && (id !== "")) {
attachment[id] = {};
if ((new_id !== undefined) && (new_id !== "")) {
attachment[new_id] = {};
}
}
return attachment;
......
......@@ -292,9 +292,9 @@
return jIO.util.readBlobAsText(error.target.response);
})
.push(function (evt) {
var err_content = JSON.parse(evt.target.result);
if ((err_content.error['.tag'] === 'path') &&
(err_content.error.path['.tag'] === 'not_found')) {
var err_content2 = JSON.parse(evt.target.result);
if ((err_content2.error['.tag'] === 'path') &&
(err_content2.error.path['.tag'] === 'not_found')) {
throw new jIO.util.jIOError("Cannot find attachment: " +
id + "/, " + name, 404);
}
......
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