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

@ -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);