@dicebear/micah
Advanced tools
Comparing version 4.6.4 to 4.6.5
@@ -42,5 +42,7 @@ "use strict"; | ||
const pickColor = (values, filter = []) => { | ||
let result = values | ||
.map((val) => colors[val] || val) | ||
.filter((val) => false === filter.includes(val)); | ||
let result = values.map((val) => colors[val] || val); | ||
// If only one color was given, that color was explicitly selected. Then do not perform any filtering. | ||
if (values.length > 1) { | ||
result = result.filter((val) => false === filter.includes(val)); | ||
} | ||
if (result.length === 0) { | ||
@@ -47,0 +49,0 @@ result.push('transparent'); |
{ | ||
"name": "@dicebear/micah", | ||
"version": "4.6.4", | ||
"version": "4.6.5", | ||
"description": "Micah avatar style for DiceBear Avatars", | ||
@@ -40,3 +40,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@dicebear/avatars": "^4.6.4", | ||
"@dicebear/avatars": "^4.6.5", | ||
"@tsconfig/node12": "^1.0.7", | ||
@@ -59,3 +59,3 @@ "@types/jest": "^26.0.22", | ||
}, | ||
"gitHead": "8a8ebb362f76ec40a13554b251c262add015bbbf" | ||
"gitHead": "9dc861992996337fc6ef9d24c7ab16205a9690a1" | ||
} |
50258
616