Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(llma): message actions menu crash on undefined content (#58808)

Carlos Marchal0a1baa86197b
diff --git a/products/llm_analytics/frontend/ConversationDisplay/ConversationMessagesDisplay.tsx b/products/llm_analytics/frontend/ConversationDisplay/ConversationMessagesDisplay.tsx
index fcd52177922e..e8f4f3b48f67 100644
--- a/products/llm_analytics/frontend/ConversationDisplay/ConversationMessagesDisplay.tsx
+++ b/products/llm_analytics/frontend/ConversationDisplay/ConversationMessagesDisplay.tsx
@@ -839,7 +839,9 @@ export const LLMMessageDisplay = React.memo(
explicitValue={typeof content === 'string' ? content : JSON.stringify(content)}
/>
<MessageActionsMenu
- content={typeof content === 'string' ? content : JSON.stringify(content, null, 2)}
+ content={
+ typeof content === 'string' ? content : (JSON.stringify(content, null, 2) ?? '')
+ }
traceId={traceId}
/>
</>