Skip to content

fix(color): fixed branch error when calling getPluginColor('error')#73

Merged
antfu merged 1 commit into
vitejs:mainfrom
liangmiQwQ:fix/correct-return-value-in-getPluginColor
Aug 11, 2025
Merged

fix(color): fixed branch error when calling getPluginColor('error')#73
antfu merged 1 commit into
vitejs:mainfrom
liangmiQwQ:fix/correct-return-value-in-getPluginColor

Conversation

@liangmiQwQ

Copy link
Copy Markdown
Contributor

Problem

We expect to get the return value from getHsla when calling getPluginColor with the any keys in predefinedColorMap

It works most of the time, but it will use getHashColorFromString when calling getPluginColor('error') although error is a key of predefinedColorMap

Fixes

Fixed the above issue by correcting filtering undefined method

@liangmiQwQ

Copy link
Copy Markdown
Contributor Author

one more thing: I will create some tests for the situation like this

@antfu antfu merged commit 94391cf into vitejs:main Aug 11, 2025
4 checks passed
liangmiQwQ added a commit to liangmiQwQ/vite-devtools that referenced this pull request Aug 12, 2025
@liangmiQwQ liangmiQwQ deleted the fix/correct-return-value-in-getPluginColor branch October 1, 2025 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants