Skip to content

Commit

Permalink
Help Center: Use default values on case of error (#97053)
Browse files Browse the repository at this point in the history
  • Loading branch information
heavyweight authored Dec 5, 2024
1 parent 2dc6cc3 commit edbbf0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/odie-client/src/data/use-odie-chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
},
Expand Down

0 comments on commit edbbf0a

Please sign in to comment.