mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-06-30 16:15:11 +08:00
fix: validateColorHex: cannot read properties of undefined (reading 'length') (#6242)
This commit is contained in:
parent
c17a4165c1
commit
68ad9a91b2
@ -109,7 +109,7 @@ const SettingsModal: FC<ISettingsModalProps> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const validateColorHex = (hex: string | null) => {
|
const validateColorHex = (hex: string | null) => {
|
||||||
if (hex === null || hex.length === 0)
|
if (hex === null || hex?.length === 0)
|
||||||
return true
|
return true
|
||||||
|
|
||||||
const regex = /#([A-Fa-f0-9]{6})/
|
const regex = /#([A-Fa-f0-9]{6})/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user