Skip to content

Commit

Permalink
Better variable name.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion committed Feb 18, 2025
1 parent a25d6b4 commit ac5ecc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export default class FetchCollector implements Collector {

constructor(options: HttpCollectorOptions) {
decorateFetch((breadcrumb) => {
let filtered = false;
let filtersExecuted = false;
try {
filterHttpBreadcrumb(breadcrumb, options);
filtered = true;
filtersExecuted = true;
} catch (err) {
if (!this._loggedIssue) {
options.getLogger?.()?.warn('Error filtering http breadcrumb', err);
Expand All @@ -25,7 +25,7 @@ export default class FetchCollector implements Collector {
}
// Only add the breadcrumb if the filter didn't throw. We don't want to
// report a breadcrumb that may have not have had the correct information redacted.
if (filtered) {
if (filtersExecuted) {
this._destination?.addBreadcrumb(breadcrumb);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export default class XhrCollector implements Collector {

constructor(options: HttpCollectorOptions) {
decorateXhr((breadcrumb) => {
let filtered = false;
let filtersExecuted = false;
try {
filterHttpBreadcrumb(breadcrumb, options);
filtered = true;
filtersExecuted = true;
} catch (err) {
if (!this._loggedIssue) {
options.getLogger?.()?.warn('Error filtering http breadcrumb', err);
Expand All @@ -26,7 +26,7 @@ export default class XhrCollector implements Collector {
}
// Only add the breadcrumb if the filter didn't throw. We don't want to
// report a breadcrumb that may have not have had the correct information redacted.
if (filtered) {
if (filtersExecuted) {
this._destination?.addBreadcrumb(breadcrumb);
}
});
Expand Down

0 comments on commit ac5ecc7

Please sign in to comment.