Fix weird bug with wrong cache of icon

This commit is contained in:
Lim Chee Aun 2024-01-26 00:28:03 +08:00
parent 9cac63c37d
commit 0386357688

View file

@ -31,7 +31,8 @@ const SVGICon = moize(
{ {
isShallowEqual: true, isShallowEqual: true,
maxSize: Object.keys(ICONS).length, maxSize: Object.keys(ICONS).length,
matchesArg: (cacheKeyArg, keyArg) => cacheKeyArg.icon === keyArg.icon, matchesArg: (cacheKeyArg, keyArg) =>
cacheKeyArg.icon === keyArg.icon && cacheKeyArg.body === keyArg.body,
}, },
); );