Signed-off-by: Mohamad Ahmadi <mohamadhasan.ahmadi@gmail.com>
This commit is contained in:
Mohamad Ahmadi
2015-02-15 12:01:47 -05:00
parent d515f4c344
commit e08df6c316

View File

@@ -128,7 +128,7 @@ ColorThief.prototype.getPalette = function(sourceImage, colorCount, quality) {
// Send array to quantize function which clusters values
// using median cut algorithm
var cmap = MMCQ.quantize(pixelArray, colorCount);
var palette = cmap.palette();
var palette = cmap? cmap.palette() : null;
// Clean up
image.removeCanvas();