Skip to content

fix(searchQueryBuilder): Add null check to formatFilterValue to prevent TypeError#119360

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/js-39r3-null-token-typeerror
Open

fix(searchQueryBuilder): Add null check to formatFilterValue to prevent TypeError#119360
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/js-39r3-null-token-typeerror

Conversation

@sentry

@sentry sentry Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Addresses JAVASCRIPT-39R3, a TypeError occurring in formatFilterValue when token is null. The root cause was that formatFilterValue was called with a null token argument, due to the call site using item.value! (a non-null assertion) which bypasses runtime null checks. The formatFilterValue function lacked a runtime null check for its token argument, leading to a crash when accessing token.type. This fix adds a null guard at the beginning of formatFilterValue to return an empty string if token is null, preventing the TypeError.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Fixes JAVASCRIPT-39R3

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@sentry sentry Bot requested a review from a team as a code owner July 9, 2026 22:37
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 9, 2026
@chromy chromy added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant