Skip to content

Commit

Permalink
Merge pull request #55 from mhahmadi/mhahmadi_fix_mmcq_return_value
Browse files Browse the repository at this point in the history
fixes #54
  • Loading branch information
lokesh committed Jun 30, 2015
2 parents 747cf9d + e08df6c commit 0511b9d
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 0511b9d

Please sign in to comment.