Skip to content

Commit aeee30e

Browse files
committed
fix: fixed branch error when calling getPluginColor('error')
1 parent bce5a87 commit aeee30e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/devtools-vite/src/app/utils

packages/devtools-vite/src/app/utils/color.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const predefinedColorMap = {
4949

5050
export function getPluginColor(name: string, opacity = 1): string {
5151
name = name.replace(/[^a-z]+/gi, '').toLowerCase()
52-
if (predefinedColorMap[name]) {
52+
if (name in predefinedColorMap) {
5353
const color = predefinedColorMap[name]!
5454
if (typeof color === 'number') {
5555
return getHsla(color, opacity)

0 commit comments

Comments
 (0)