improve type guard

This commit is contained in:
bymyself
2025-10-17 13:31:18 -07:00
parent 9f046a11ea
commit e8461252c1

View File

@@ -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
)
}