From 03863576881642d2c53350f6388811f1827bcee7 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 26 Jan 2024 00:28:03 +0800 Subject: [PATCH] Fix weird bug with wrong cache of icon --- src/components/icon.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/icon.jsx b/src/components/icon.jsx index df1e0c8c..16fb7c22 100644 --- a/src/components/icon.jsx +++ b/src/components/icon.jsx @@ -31,7 +31,8 @@ const SVGICon = moize( { isShallowEqual: true, maxSize: Object.keys(ICONS).length, - matchesArg: (cacheKeyArg, keyArg) => cacheKeyArg.icon === keyArg.icon, + matchesArg: (cacheKeyArg, keyArg) => + cacheKeyArg.icon === keyArg.icon && cacheKeyArg.body === keyArg.body, }, );