From fb5e75668355d0802e6d6e582fb69f5de9b249ed Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 10 Dec 2016 12:33:40 +0100 Subject: [PATCH] Fix errors reported by the `no-cond-assign` ESLint rule http://eslint.org/docs/rules/no-cond-assign --- src/shared/util.js | 2 +- web/compatibility.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/util.js b/src/shared/util.js index de33f2be..c19a588e 100644 --- a/src/shared/util.js +++ b/src/shared/util.js @@ -2166,7 +2166,7 @@ if (typeof PDFJSDev === 'undefined' || !PDFJSDev.test('MOZCENTRAL')) { err('\\ not allowed in relative path.'); } var tmp; - if (tmp = relativePathDotMapping[buffer.toLowerCase()]) { + if ((tmp = relativePathDotMapping[buffer.toLowerCase()])) { buffer = tmp; } if ('..' === buffer) { diff --git a/web/compatibility.js b/web/compatibility.js index f040e2a2..4300686e 100644 --- a/web/compatibility.js +++ b/web/compatibility.js @@ -270,7 +270,7 @@ if (typeof PDFJS === 'undefined') { // initialize result and counters var bc = 0, bs, buffer, idx = 0, output = ''; // get next character - buffer = input.charAt(idx++); + (buffer = input.charAt(idx++)); // character found in table? // initialize bit storage and add its ascii value ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer,