mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-05-20 22:23:47 +00:00
ci(preview theme): allow gradient colors (2) (#3427)
This commit is contained in:
committed by
GitHub
parent
87a3bf38c2
commit
0691084c39
+4
-1
@@ -245,7 +245,10 @@ const clampValue = (number, min, max) => {
|
||||
* @returns {boolean} True if the given string is a valid gradient.
|
||||
*/
|
||||
const isValidGradient = (colors) => {
|
||||
return colors.slice(1).every((color) => isValidHexColor(color));
|
||||
return (
|
||||
colors.length > 2 &&
|
||||
colors.slice(1).every((color) => isValidHexColor(color))
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user