mirror of
https://github.com/System-End/github-readme-stats.git
synced 2026-04-19 19:55:16 +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:
parent
e088a16151
commit
dfecef5c34
1 changed files with 1 additions and 1 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue