Skip to content

Commit

Permalink
Remove debug code and simplify in onEachInteraction (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine authored Jun 7, 2024
1 parent 078d5c6 commit 5c638ab
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/browser_action/on-each-interaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,11 @@ export function onEachInteraction(callback) {
for (const interaction of Object.values(interactions)) {
const entry = interaction.reduce((prev, curr) => prev.duration >= curr.duration ? prev : curr);
const value = entry.duration;
const interactionId = entry.interactionId;

// Filter down LoAFs to ones that intersected any event startTime and any processingEnd
const longAnimationFrameEntries = getIntersectingLoAFs(entry.startTime, entry.startTime + entry.value)

let firstEntryWithTarget = interaction[0].target;
firstEntryWithTarget = null;
if (!firstEntryWithTarget) {
firstEntryWithTarget = Object.values(interactions).flat().find(entry => entry.interactionId === interactionId && entry.target)?.target;
}
const firstEntryWithTarget = interaction.find(entry => entry.target)?.target;

callback({
attribution: {
Expand Down

0 comments on commit 5c638ab

Please sign in to comment.