Fix errors reported by the yoda ESLint rule

http://eslint.org/docs/rules/yoda
This commit is contained in:
Jonas Jenwald 2016-12-10 17:23:46 +01:00
parent e53ab844cc
commit 66d2637b3f
2 changed files with 6 additions and 6 deletions

View File

@ -2057,17 +2057,17 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
return new NullCipher();
};
}
if ('V2' === cfm.name) {
if (cfm.name === 'V2') {
return function cipherTransformFactoryBuildCipherConstructorV2() {
return new ARCFourCipher(buildObjectKey(num, gen, key, false));
};
}
if ('AESV2' === cfm.name) {
if (cfm.name === 'AESV2') {
return function cipherTransformFactoryBuildCipherConstructorAESV2() {
return new AES128Cipher(buildObjectKey(num, gen, key, true));
};
}
if ('AESV3' === cfm.name) {
if (cfm.name === 'AESV3') {
return function cipherTransformFactoryBuildCipherConstructorAESV3() {
return new AES256Cipher(key);
};

View File

@ -1780,13 +1780,13 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
this.save();
this.baseTransformStack.push(this.baseTransform);
if (isArray(matrix) && 6 === matrix.length) {
if (isArray(matrix) && matrix.length === 6) {
this.transform.apply(this, matrix);
}
this.baseTransform = this.ctx.mozCurrentTransform;
if (isArray(bbox) && 4 === bbox.length) {
if (isArray(bbox) && bbox.length === 4) {
var width = bbox[2] - bbox[0];
var height = bbox[3] - bbox[1];
this.ctx.rect(bbox[0], bbox[1], width, height);
@ -1947,7 +1947,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
matrix) {
this.save();
if (isArray(rect) && 4 === rect.length) {
if (isArray(rect) && rect.length === 4) {
var width = rect[2] - rect[0];
var height = rect[3] - rect[1];
this.ctx.rect(rect[0], rect[1], width, height);