From ccdfd53648a14a22e0fa661b694c1db8d9197dda Mon Sep 17 00:00:00 2001
From: Beebles <102569435+beebls@users.noreply.github.com>
Date: Thu, 8 Aug 2024 17:13:41 -0600
Subject: only set motd if value returned

---
 frontend/src/components/MotdDisplay.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'frontend/src/components/MotdDisplay.tsx')

diff --git a/frontend/src/components/MotdDisplay.tsx b/frontend/src/components/MotdDisplay.tsx
index 0ad45338..d5236d88 100644
--- a/frontend/src/components/MotdDisplay.tsx
+++ b/frontend/src/components/MotdDisplay.tsx
@@ -35,7 +35,7 @@ export function MotdDisplay() {
 
   async function fetchMotd() {
     const motd = await getMotd();
-    setMotd(motd);
+    motd && setMotd(motd);
   }
 
   useEffect(() => {
-- 
cgit v1.2.3

