From 0baf6ed9b28b469ab7ade3da5d0f4158b319bb95 Mon Sep 17 00:00:00 2001 From: Kosta Date: Thu, 5 Dec 2024 12:18:23 +0100 Subject: [PATCH] Help Center: Use default values on case of error (#97053) --- packages/odie-client/src/data/use-odie-chat.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/odie-client/src/data/use-odie-chat.ts b/packages/odie-client/src/data/use-odie-chat.ts index f6b95aafcf1c74..34104a92e9edeb 100644 --- a/packages/odie-client/src/data/use-odie-chat.ts +++ b/packages/odie-client/src/data/use-odie-chat.ts @@ -34,8 +34,8 @@ export const useOdieChat = ( chatId: number | null ) => { ) as ReturnedChat; return { - messages: data.messages, - odieId: Number( data.chat_id ), + messages: data.messages || [], + odieId: Number( data.chat_id ) || chatId, wpcomUserId: data.wpcom_user_id, }; },