From 74585fcfb481f057357bcc79c7841bc5fea3fc6e Mon Sep 17 00:00:00 2001 From: "james.cryer" Date: Wed, 30 Aug 2017 14:32:54 +0100 Subject: [PATCH] spacing and falsey --- resemble.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resemble.js b/resemble.js index c08109f..938146f 100644 --- a/resemble.js +++ b/resemble.js @@ -30,15 +30,15 @@ URL: https://github.com/Huddle/Resemble.js } function withinBoundingBox(x, y, width, height) { - if (boundingBox === null) { + if (!boundingBox) { return true; - } + } - return x > (boundingBox.x1 || 0) && - x < (boundingBox.x2 || width) && - y > (boundingBox.y1 || 0) && - y < (boundingBox.y2 || height); - } + return x > (boundingBox.x1 || 0) && + x < (boundingBox.x2 || width) && + y > (boundingBox.y1 || 0) && + y < (boundingBox.y2 || height); + } var errorPixelTransform = { flat: function (px, offset, d1, d2) { @@ -70,7 +70,7 @@ URL: https://github.com/Huddle/Resemble.js }; var errorPixel = errorPixelTransform.flat; - var boundingBox = null; + var boundingBox; var largeImageThreshold = 1200; var useCrossOrigin = true; var document = typeof window != "undefined" ? window.document : {