Skip to content

Commit 8064da8

Browse files
Lms24claude
andcommitted
fix(core): Remove unnecessary type assertion flagged by lint
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 50c3264 commit 8064da8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/core/src/client.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,9 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
15571557
this.recordDroppedEvent('ignored', 'span', ignoredSpanCount);
15581558
}
15591559

1560-
if (processedEvent === null || !isPlainObject(processedEvent as unknown)) {
1560+
// An annotated boolean keeps `isPlainObject` from narrowing `processedEvent` to a plain record
1561+
const isValidEvent: boolean = isPlainObject(processedEvent);
1562+
if (!isValidEvent || processedEvent === null) {
15611563
this.recordDroppedEvent(beforeSendDropReason, dataCategory);
15621564
if (isTransaction) {
15631565
// the transaction itself counts as one span, plus all the child spans that weren't ignored before

0 commit comments

Comments
 (0)