Skip to content

Commit b42a04e

Browse files
committed
ref: treeshake entire if block if debug is not enabled
1 parent 7ade71d commit b42a04e

File tree

1 file changed

+6
-2
lines changed
  • packages/core/src/transports

1 file changed

+6
-2
lines changed

packages/core/src/transports/base.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,12 @@ export function createTransport(
8484
}
8585

8686
// We don't want to throw on NOK responses, but we want to at least log them
87-
if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {
88-
DEBUG_BUILD && debug.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);
87+
if (
88+
DEBUG_BUILD &&
89+
response.statusCode !== undefined &&
90+
(response.statusCode < 200 || response.statusCode >= 300)
91+
) {
92+
debug.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);
8993
}
9094

9195
rateLimits = updateRateLimits(rateLimits, response);

0 commit comments

Comments
 (0)