[Pkg-javascript-commits] [pdf.js] 65/246: Add strict equalities in src/display/api.js
David Prévot
taffit at moszumanska.debian.org
Sun Sep 7 15:36:26 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit a4b06d7a0297525519e116741930d061be28d63a
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Fri Aug 1 12:39:31 2014 +0200
Add strict equalities in src/display/api.js
---
src/display/api.js | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/display/api.js b/src/display/api.js
index e2cb8c9..ed58657 100644
--- a/src/display/api.js
+++ b/src/display/api.js
@@ -503,8 +503,7 @@ var PDFPageProxy = (function PDFPageProxyClosure() {
// this call to render.
this.pendingDestroy = false;
- var renderingIntent = ('intent' in params ?
- (params.intent == 'print' ? 'print' : 'display') : 'display');
+ var renderingIntent = (params.intent === 'print' ? 'print' : 'display');
if (!this.intentStates[renderingIntent]) {
this.intentStates[renderingIntent] = {};
@@ -1003,7 +1002,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
messageHandler.on('JpegDecode', function(data) {
var imageUrl = data[0];
var components = data[1];
- if (components != 3 && components != 1) {
+ if (components !== 3 && components !== 1) {
return Promise.reject(
new Error('Only 3 components or 1 component can be returned'));
}
@@ -1022,13 +1021,13 @@ var WorkerTransport = (function WorkerTransportClosure() {
var data = tmpCtx.getImageData(0, 0, width, height).data;
var i, j;
- if (components == 3) {
+ if (components === 3) {
for (i = 0, j = 0; i < rgbaLength; i += 4, j += 3) {
buf[j] = data[i];
buf[j + 1] = data[i + 1];
buf[j + 2] = data[i + 2];
}
- } else if (components == 1) {
+ } else if (components === 1) {
for (i = 0, j = 0; i < rgbaLength; i += 4, j++) {
buf[j] = data[i];
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list