mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 00:50:01 +00:00
improve type guard
This commit is contained in:
@@ -91,7 +91,7 @@ export const useColorPaletteService = () => {
|
||||
propertyMaybe: unknown
|
||||
): propertyMaybe is keyof typeof THEME_PROPERTY_MAP {
|
||||
return (
|
||||
(propertyMaybe as keyof typeof THEME_PROPERTY_MAP) in THEME_PROPERTY_MAP
|
||||
typeof propertyMaybe === 'string' && propertyMaybe in THEME_PROPERTY_MAP
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user