Skip to content

Commit

Permalink
address lint reports
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Apr 2, 2019
1 parent 30e8e17 commit 9e87c5e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions DOI.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
***** END LICENSE BLOCK *****
*/

/* eslint-disable no-loop-func */

// The variables items and selectArray will be filled during the first
// as well as the second retrieveDOIs function call and therefore they
// are defined global.
Expand Down Expand Up @@ -102,14 +104,10 @@ function detectWeb(doc, url) {
return false;
}

function completeDOIs(doc) {
function completeDOIs(_doc) {
// all DOIs retrieved now
// check to see if there is more than one DOI
var numDOIs = 0;
for (var DOI in selectArray) {
numDOIs++;
if (numDOIs == 2) break;
}
var numDOIs = Object.keys(selectArray).length;
if (numDOIs == 0) {
throw new Error("DOI Translator: could not find DOI");
}
Expand Down Expand Up @@ -158,7 +156,7 @@ function retrieveDOIs(dois, doc, providers) {
}
});

translate.setHandler("done", function (translate) {
translate.setHandler("done", function (_translate) {
numDois--;
if (numDois <= 0) {
Z.debug("Done with " + provider.name + ". Remaining DOIs: " + remainingDOIs);
Expand Down

0 comments on commit 9e87c5e

Please sign in to comment.