From d6811e41633bcea71a019dc8295c1383e75fb119 Mon Sep 17 00:00:00 2001 From: orion-047 <161582484+orion-047@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:31:45 +0800 Subject: [PATCH] fix: correct the `exists` function to properly check for both null and undefined --- .../dao/[symbol]/proposal/components/GovernedAccountSelect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/dao/[symbol]/proposal/components/GovernedAccountSelect.tsx b/pages/dao/[symbol]/proposal/components/GovernedAccountSelect.tsx index 9f8e714480..84d56235c8 100644 --- a/pages/dao/[symbol]/proposal/components/GovernedAccountSelect.tsx +++ b/pages/dao/[symbol]/proposal/components/GovernedAccountSelect.tsx @@ -34,7 +34,7 @@ import MintIcon from '@components/treasuryV2/icons/MintIcon' import { getAccountName } from '@components/instructions/tools' function exists(item: T | null | undefined): item is T { - return item !== null || item !== undefined + return item !== null && item !== undefined } function RulesPill(props: { icon: JSX.Element; value: string; label: string }) {