From 47281658d2fa9922e0ec621755b6f1ea530a42ba Mon Sep 17 00:00:00 2001 From: James Cryer Date: Wed, 10 Sep 2014 10:38:06 +0100 Subject: [PATCH] fixes #26 Transparency default value bug when zero --- resemble.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resemble.js b/resemble.js index c9045fb..c38553d 100644 --- a/resemble.js +++ b/resemble.js @@ -600,7 +600,7 @@ URL: https://github.com/Huddle/Resemble.js errorPixelTransformer = errorPixelTransform[options.errorType]; } - pixelTransparency = options.transparency || pixelTransparency; + pixelTransparency = isNaN(Number(options.transparency)) ? pixelTransparency : options.transparency; if (options.largeImageThreshold !== undefined) { largeImageThreshold = options.largeImageThreshold;