@@ -122,19 +122,16 @@ export class Aggregate extends AggregateBase {
122122 if ( this . agentRef . info . beacon ) internalTraffic . push ( this . agentRef . info . beacon )
123123 if ( this . agentRef . init . proxy ?. beacon ) internalTraffic . push ( this . agentRef . init . proxy . beacon )
124124 function evalNetworkRequest ( host ) {
125- const isNonAgentTraffic = host && ! internalTraffic . includes ( host )
126- if ( isNonAgentTraffic && this . userActionAggregator . isEvaluatingDeadClick ( ) ) {
127- this . userActionAggregator . treatAsLiveClick ( )
128- }
125+ if ( host && ! internalTraffic . includes ( host ) ) this . userActionAggregator . treatAsLiveClick ( )
129126 }
130127
131128 registerHandler ( 'ua' , ( evt ) => {
132129 /** the processor will return the previously aggregated event if it has been completed by processing the current event */
133130 addUserAction ( this . userActionAggregator . process ( evt , this . agentRef . init . user_actions . elementAttributes ) )
134131 } , this . featureName , this . ee )
135132 registerHandler ( 'err' , ( ) => this . userActionAggregator . markAsErrorClick ( ) , this . featureName , this . ee )
136- registerHandler ( 'xhr' , ( params ) => evalNetworkRequest . call ( this , params . host ) , this . featureName , this . ee )
137- registerHandler ( 'navChange' , ( ) => this . userActionAggregator . treatAsLiveClick ( ) , this . featureName , this . ee )
133+ registerHandler ( 'xhr' , ( params ) => { if ( this . userActionAggregator . isEvaluatingDeadClick ( ) ) evalNetworkRequest . call ( this , params . host ) } , this . featureName , this . ee )
134+ registerHandler ( 'navChange' , ( ) => { if ( this . userActionAggregator . isEvaluatingDeadClick ( ) ) this . userActionAggregator . treatAsLiveClick ( ) } , this . featureName , this . ee )
138135 }
139136
140137 /**
0 commit comments