Skip to content

Commit 50b2e35

Browse files
committed
remove unnecessary evaluations
1 parent 6bcaf83 commit 50b2e35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redisinsight/ui/src/pages/pub-sub/components/subscribe-form/SubscribeForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const SubscribeForm = (props: SubscribeFormProps) => {
2121

2222
const { isSubscribed, subscriptions, loading } = useSelector(pubSubSelector)
2323

24-
const [channels, setChannels] = useState(
24+
const [channels, setChannels] = useState(() =>
2525
subscriptions?.length
2626
? subscriptions.map((sub) => sub.channel).join(' ')
2727
: DEFAULT_SEARCH_MATCH,

0 commit comments

Comments
 (0)