From 5f29f8dd0eb2afacdf286232017cffdbf8e45a5c Mon Sep 17 00:00:00 2001 From: Tristan Cavelier <tristan.cavelier@tiolive.com> Date: Thu, 19 Sep 2013 17:48:42 +0200 Subject: [PATCH] fix jslint errors --- src/jio.storage/davstorage.js | 8 ++++---- test/jio.storage/davstorage.livetests.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/jio.storage/davstorage.js b/src/jio.storage/davstorage.js index 42cbaab..bd1f9ee 100644 --- a/src/jio.storage/davstorage.js +++ b/src/jio.storage/davstorage.js @@ -129,7 +129,7 @@ * @return {String} The original name */ function restoreName(secured_name) { - return decodeURI(secured_name.replace(/%3F/ig, '?').replace(/%2F/ig, '/')); + return decodeURI(secured_name.replace(/%3F/ig, '?').replace(/%2F/ig, '/')); } /** @@ -181,7 +181,7 @@ */ var ajax = { "none": function (method, type, url, data) { - var headers; + var headers = {}; if (method === "PROPFIND") { headers.Depth = "1"; } @@ -337,9 +337,9 @@ textContent.split('/').slice(-1)[0]; row.id = fileNameToIds(row.id); if (row.id.length !== 1) { - row = undefined; + row = undefined; } else { - row.id = row.id[0]; + row.id = row.id[0]; } if (row !== undefined) { rows[rows.length] = row; diff --git a/test/jio.storage/davstorage.livetests.js b/test/jio.storage/davstorage.livetests.js index c267c5d..872863a 100644 --- a/test/jio.storage/davstorage.livetests.js +++ b/test/jio.storage/davstorage.livetests.js @@ -113,7 +113,7 @@ function list2DocumentsTest(answer) { if (answer && answer.data && Array.isArray(answer.data.rows)) { - answer.data.rows.sort(function (a, b) { + answer.data.rows.sort(function (a) { return a.id === "b" ? 1 : 0; }); } -- 2.30.9