Browse Source

fix(replays): Show correct duration/errors (#35485)

### Description

Fixes: #35484 

### Screenshots

<img width="943" alt="image" src="https://user-images.githubusercontent.com/14813235/172702733-369cf134-e5d1-4a6d-9621-2ca33ea771cb.png">
Daian Scuarissi 2 years ago
parent
commit
c7d43ea615
1 changed files with 5 additions and 5 deletions
  1. 5 5
      static/app/views/replays/replayTable.tsx

+ 5 - 5
static/app/views/replays/replayTable.tsx

@@ -46,7 +46,7 @@ function ReplayTable({replayList, idKey, showProjectColumn}: Props) {
   const isScreenLarge = useMedia(`(min-width: ${theme.breakpoints[0]})`);
 
   const getEventView = () => {
-    const query = replayList.map(item => `replayId:${item.id}`).join(' OR ');
+    const query = replayList.map(item => `replayId:${item[idKey]}`).join(' OR ');
     const eventQueryParams: NewQuery = {
       id: '',
       name: '',
@@ -136,8 +136,8 @@ function ReplayTable({replayList, idKey, showProjectColumn}: Props) {
                     <Duration
                       seconds={
                         Math.floor(
-                          dataEntries[replay.id]
-                            ? dataEntries[replay.id]['equation[0]']
+                          dataEntries[replay[idKey]]
+                            ? dataEntries[replay[idKey]]['equation[0]']
                             : 0
                         ) || 1
                       }
@@ -146,8 +146,8 @@ function ReplayTable({replayList, idKey, showProjectColumn}: Props) {
                     />
                   </Item>
                   <Item>
-                    {dataEntries[replay.id]
-                      ? dataEntries[replay.id]?.count_if_event_type_equals_error
+                    {dataEntries[replay[idKey]]
+                      ? dataEntries[replay[idKey]]?.count_if_event_type_equals_error
                       : 0}
                   </Item>
                 </React.Fragment>