From f454dbf4ee14745c6791b2d5ec763ad0a77d6fc2 Mon Sep 17 00:00:00 2001 From: Ross Bulat Date: Thu, 15 Feb 2024 12:08:55 +0700 Subject: [PATCH] fix: stringify nomination comparison (#1952) --- src/library/GenerateNominations/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/library/GenerateNominations/index.tsx b/src/library/GenerateNominations/index.tsx index 997ebd7399..6b5d14b5c8 100644 --- a/src/library/GenerateNominations/index.tsx +++ b/src/library/GenerateNominations/index.tsx @@ -77,7 +77,8 @@ export const GenerateNominations = ({ // Update nominations on account switch, or if `defaultNominations` change. useEffect(() => { if ( - nominations !== defaultNominations.nominations && + JSON.stringify(nominations) !== + JSON.stringify(defaultNominations.nominations) && defaultNominationsCount > 0 ) { setNominations([...(defaultNominations.nominations || [])]);