File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,16 @@ export default class WebPerfPlugin extends SitespeedioPlugin {
250
250
this . data . groups [ group ] . issues = this . sortIssues ( this . data . groups [ group ] . issues ) ;
251
251
this . data . groups [ group ] . pages [ entry . url ] . issues = this . sortIssues ( this . data . groups [ group ] . pages [ entry . url ] . issues ) ;
252
252
253
+ // Remove duplicates
254
+ this . data . groups [ group ] . issues = this . data . groups [ group ] . issues . filter ( ( issue , index , self ) =>
255
+ index === self . findIndex ( ( other ) => (
256
+ other . test == issue . test &&
257
+ other . rule === issue . rule &&
258
+ other . severity === issue . severity &&
259
+ other . category === issue . category
260
+ ) )
261
+ ) ;
262
+
253
263
// Calculate score
254
264
this . data . groups [ group ] . score = this . scoreHelper . calculateScore ( this . data . groups [ group ] . issues )
255
265
this . data . groups [ group ] . pages [ entry . url ] . score = this . scoreHelper . calculateScore ( this . data . groups [ group ] . pages [ entry . url ] . issues )
You can’t perform that action at this time.
0 commit comments