mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-03 00:17:58 +00:00
fix: return "" instead of return undefined (#1133)
the function renderGradient may return undefined if colors.bgColor !== "object" which may render "undefined" into svg
This commit is contained in:
+1
-1
@@ -94,7 +94,7 @@ class Card {
|
||||
}
|
||||
|
||||
renderGradient() {
|
||||
if (typeof this.colors.bgColor !== "object") return;
|
||||
if (typeof this.colors.bgColor !== "object") return "";
|
||||
|
||||
const gradients = this.colors.bgColor.slice(1);
|
||||
return typeof this.colors.bgColor === "object"
|
||||
|
||||
Reference in New Issue
Block a user