Skip to content

Commit

Permalink
fix: stringify nomination comparison (#1952)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat authored Feb 15, 2024
1 parent e09176b commit f454dbf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/library/GenerateNominations/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 || [])]);
Expand Down

0 comments on commit f454dbf

Please sign in to comment.