Browse Source

fix(issue-stream): Prevent undefined values from being stored in actionTakenGroupData (#55593)

We need to cast to `Group` on this line because of the broad typing in
GroupStore, but it should have been Group | undefined. Adding a filter 
here prevents errors downstream.
Malachi Willey 1 year ago
parent
commit
3ca03e304c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      static/app/views/issueList/overview.tsx

+ 3 - 1
static/app/views/issueList/overview.tsx

@@ -1026,7 +1026,9 @@ class IssueListOverview extends Component<Props, State> {
   };
 
   onActionTaken = (itemIds: string[]) => {
-    const actionTakenGroupData = itemIds.map(id => GroupStore.get(id) as Group);
+    const actionTakenGroupData = itemIds
+      .map(id => GroupStore.get(id) as Group | undefined)
+      .filter(defined);
     this.setState({
       actionTakenGroupData,
     });