File tree 1 file changed +10
-5
lines changed
ui/shared/tabs/failureSummary
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ class FailureSummaryTab extends React.Component {
95
95
96
96
checkInternalFailureOccurrences = ( bugInternalId ) => {
97
97
// Try matching an internal bug already fetched with enough occurences
98
- const { suggestion , suggestions } = this . state ;
98
+ const { suggestions } = this . state ;
99
99
100
100
const internalBugs = suggestions
101
101
. map ( ( s ) => s . bugs . open_recent )
@@ -104,11 +104,16 @@ class FailureSummaryTab extends React.Component {
104
104
const existingBug = internalBugs . filter (
105
105
( bug ) => bug . internal_id === bugInternalId ,
106
106
) [ 0 ] ;
107
+ if ( ! existingBug ) {
108
+ return ;
109
+ }
110
+ const suggestion = suggestions . find ( ( s ) =>
111
+ s . bugs . open_recent
112
+ . map ( ( bug ) => bug . internal_id )
113
+ . includes ( existingBug . internal_id ) ,
114
+ ) ;
107
115
// Check if we reached the required number of occurrence to open a bug in Bugzilla
108
- if (
109
- existingBug &&
110
- existingBug . occurrences >= requiredInternalOccurrences - 1
111
- ) {
116
+ if ( existingBug . occurrences >= requiredInternalOccurrences - 1 ) {
112
117
existingBug . occurrences += 1 ;
113
118
this . fileBug ( suggestion ) ;
114
119
}
You can’t perform that action at this time.
0 commit comments