File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -231,15 +231,16 @@ export class InspectionStatistics {
231231 this . ipAddresses . total += 1 ;
232232 }
233233
234- const blockingMatches = matches . filter ( ( match ) => ! match . monitor ) ;
235- if ( blockingMatches . length > 0 ) {
234+ const blockingMatch = matches . find ( ( match ) => ! match . monitor ) ;
235+ if ( blockingMatch ) {
236236 this . ipAddresses . blocked += 1 ;
237237 }
238238
239239 matches . forEach ( ( match ) => {
240240 if ( ! this . ipAddresses . breakdown [ match . key ] ) {
241241 this . ipAddresses . breakdown [ match . key ] = { total : 0 , blocked : 0 } ;
242242 }
243+
243244 this . ipAddresses . breakdown [ match . key ] . total += 1 ;
244245
245246 if ( ! match . monitor ) {
@@ -253,15 +254,16 @@ export class InspectionStatistics {
253254 this . userAgents . total += 1 ;
254255 }
255256
256- const blockingMatches = matches . filter ( ( match ) => ! match . monitor ) ;
257- if ( blockingMatches . length > 0 ) {
257+ const blockingMatch = matches . find ( ( match ) => ! match . monitor ) ;
258+ if ( blockingMatch ) {
258259 this . userAgents . blocked += 1 ;
259260 }
260261
261262 matches . forEach ( ( match ) => {
262263 if ( ! this . userAgents . breakdown [ match . key ] ) {
263264 this . userAgents . breakdown [ match . key ] = { total : 0 , blocked : 0 } ;
264265 }
266+
265267 this . userAgents . breakdown [ match . key ] . total += 1 ;
266268
267269 if ( ! match . monitor ) {
You can’t perform that action at this time.
0 commit comments