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

View File

@@ -96,7 +96,7 @@ ColorThief.prototype.getColor = function(sourceImage, quality) {
*/ */
ColorThief.prototype.getPalette = function(sourceImage, colorCount, quality) { ColorThief.prototype.getPalette = function(sourceImage, colorCount, quality) {
if (typeof colorCount === 'undefined') { if (typeof colorCount === 'undefined' || colorCount < 2 || colorCount > 256) {
colorCount = 10; colorCount = 10;
} }
if (typeof quality === 'undefined') { if (typeof quality === 'undefined') {