Skip to content

Commit

Permalink
Fix crash bug with invalid color (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisvasq committed Nov 23, 2024
1 parent 9c1f038 commit 2b332cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ export const getChartItemColor = (name) => {

export const rgbStrToArray = (str) => str.match(/[.\d]+/g)

export const getColorString = (rawColor) => color(rawColor).formatRgb()
export const getColorString = (rawColor) => color(rawColor)?.formatRgb()

export const getContrastText = (bgColor) => {
const background = color(bgColor)
Expand Down

0 comments on commit 2b332cd

Please sign in to comment.