You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(insights): Prevent duplicate rows in footer of Slow Queries widget (#93453)
Closes [DAIN-630: Widget footers incorrectly render duplicate rows when
changing
filters](https://linear.app/getsentry/issue/DAIN-630/widget-footers-incorrectly-render-duplicate-rows-when-changing-filters).
There were two errors:
1. The `enabled: ` check wasn't working correctly. `data` is _always_ an
array, and `!!([])` evalues to `true` so the query was always enabled.
This causes an extra query with no conditions to fire every time the
filters change
2. The `key` of the items in the footer was not unique, since multiple
spans of the same normalized description can come back between requests
and between renders. Duplicate keys can cause duplicate items in the
list in some cases (like this case)
This PR fixes both those errors. This is a little tough to see locally
since it's obscured by DAIN-629.
0 commit comments