Skip to content

Commit

Permalink
fix(system): fix caching issue with value with different types
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Nov 5, 2021
1 parent af10d59 commit 4a6ded3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/system/src/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const themeGetter = <T = any>({
if (!string(value) && !num(value) && value !== true) {
return res as CSSScalar
}
const cacheKey = `${value}-${defaultValue}`
const cacheKey = `${typeof value}-${value}-${defaultValue}`
const cache = getCache<CSSScalar>(props.theme, `__themeGetter${id}`)
if (cache.has(cacheKey)) return cache.get(cacheKey)

Expand Down

0 comments on commit 4a6ded3

Please sign in to comment.