From e0533df5250e7a129464f7cb813ea26c1efbd2d7 Mon Sep 17 00:00:00 2001 From: Zubeen Date: Thu, 5 Oct 2023 02:23:45 +0530 Subject: [PATCH] refactor: add optional chain instead of expression --- library/src/containers/Messages/MessageExample.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/containers/Messages/MessageExample.tsx b/library/src/containers/Messages/MessageExample.tsx index 7b32ae4ad..ed9971891 100644 --- a/library/src/containers/Messages/MessageExample.tsx +++ b/library/src/containers/Messages/MessageExample.tsx @@ -52,7 +52,7 @@ export const Example: React.FunctionComponent = ({ }) => { const config = useConfig(); const [expanded, setExpanded] = useState( - (config && config.expand && config.expand.messageExamples) || false, + config?.expand?.messageExamples ?? false ); useEffect(() => {