Skip to content

Commit

Permalink
fixes #54
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamad Ahmadi <mohamadhasan.ahmadi@gmail.com>
  • Loading branch information
mhahmadi committed Feb 15, 2015
1 parent d515f4c commit e08df6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/color-thief.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e08df6c

Please sign in to comment.