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: don't render a broken side action on the empty retry button (#71997)

Gustavo H. Strassburgera778eaf235ae
diff --git a/frontend/src/scenes/insights/EmptyStates/EmptyStates.tsx b/frontend/src/scenes/insights/EmptyStates/EmptyStates.tsx
index 577f86a6260c..0d8988e860e4 100644
--- a/frontend/src/scenes/insights/EmptyStates/EmptyStates.tsx
+++ b/frontend/src/scenes/insights/EmptyStates/EmptyStates.tsx
@@ -173,24 +173,23 @@ const RetryButton = ({
onRetry: () => void
query?: Record<string, any> | Node | null
}): JSX.Element => {
- let sideAction = {}
- if (query) {
- sideAction = {
- dropdown: {
- overlay: (
- <LemonMenuOverlay
- items={[
- {
- label: 'Open in query debugger',
- to: urls.debugQuery(query),
- },
- ]}
- />
- ),
- placement: 'bottom-end',
- },
- }
- }
+ const sideAction = query
+ ? {
+ dropdown: {
+ overlay: (
+ <LemonMenuOverlay
+ items={[
+ {
+ label: 'Open in query debugger',
+ to: urls.debugQuery(query),
+ },
+ ]}
+ />
+ ),
+ placement: 'bottom-end' as const,
+ },
+ }
+ : undefined
return (
<LemonButton