Skip to content

Commit

Permalink
ref: Move httpcontext to preprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Sep 20, 2023
1 parent 614e71b commit 1a24b5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/browser/src/integrations/httpcontext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export class HttpContext implements Integration {
}

/** @inheritDoc */
public processEvent(event: Event): Event {
public preprocessEvent(event: Event): void {
// if none of the information we want exists, don't bother
if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {
return event;
return;
}

// grab as much info as exists and add it to the event
Expand All @@ -44,6 +44,6 @@ export class HttpContext implements Integration {
};
const request = { ...event.request, ...(url && { url }), headers };

return { ...event, request };
event.request = request;
}
}

0 comments on commit 1a24b5d

Please sign in to comment.