File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -295,20 +295,20 @@ class Catcher {
295295 */
296296 if ( typeof this . beforeSend === 'function' ) {
297297 const eventClone = structuredClone ( payload ) ;
298- const modified = this . beforeSend ( eventClone ) ;
298+ const result = this . beforeSend ( eventClone ) ;
299299
300300 /**
301301 * false → drop event
302302 */
303- if ( modified === false ) {
303+ if ( result === false ) {
304304 return ;
305305 }
306306
307307 /**
308308 * Valid event payload → use it instead of original
309309 */
310- if ( isValidEventPayload ( modified ) ) {
311- payload = modified ;
310+ if ( isValidEventPayload ( result ) ) {
311+ payload = result ;
312312 } else {
313313 /**
314314 * Anything else is invalid — warn, payload stays untouched (hook only received a clone)
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ function isValidBreadcrumb(v: unknown): v is Breadcrumb {
6666
6767 const candidate = v as Record < string , unknown > ;
6868
69- if ( typeof candidate . message !== 'string' || ( candidate . message as string ) . trim ( ) === '' ) {
69+ if ( typeof candidate . message !== 'string' || candidate . message . trim ( ) === '' ) {
7070 return false ;
7171 }
7272
@@ -138,20 +138,20 @@ export class BreadcrumbManager {
138138
139139 if ( this . options . beforeBreadcrumb ) {
140140 const breadcrumbClone = structuredClone ( bc ) ;
141- const modified = this . options . beforeBreadcrumb ( breadcrumbClone , hint ) ;
141+ const result = this . options . beforeBreadcrumb ( breadcrumbClone , hint ) ;
142142
143143 /**
144144 * false means discard
145145 */
146- if ( modified === false ) {
146+ if ( result === false ) {
147147 return ;
148148 }
149149
150150 /**
151151 * Valid breadcrumb → apply changes from hook
152152 */
153- if ( isValidBreadcrumb ( modified ) ) {
154- Object . assign ( bc , modified ) ;
153+ if ( isValidBreadcrumb ( result ) ) {
154+ Object . assign ( bc , result ) ;
155155 } else {
156156 /**
157157 * Anything else is invalid — warn, bc stays untouched (hook only received a clone)
You can’t perform that action at this time.
0 commit comments