File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
packages/tracing/src/browser Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -217,15 +217,16 @@ export function xhrCallback(
217
217
218
218
// check first if the request has finished and is tracked by an existing span which should now end
219
219
if ( handlerData . endTimestamp ) {
220
- if ( ! handlerData . xhr . __sentry_xhr_span_id__ ) return ;
220
+ const spanId = handlerData . xhr . __sentry_xhr_span_id__ ;
221
+ if ( ! spanId ) return ;
221
222
222
- const span = spans [ handlerData . xhr . __sentry_xhr_span_id__ ] ;
223
+ const span = spans [ spanId ] ;
223
224
if ( span ) {
224
225
span . setHttpStatus ( xhr . status_code ) ;
225
226
span . finish ( ) ;
226
227
227
228
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
228
- delete spans [ handlerData . xhr . __sentry_xhr_span_id__ ] ;
229
+ delete spans [ spanId ] ;
229
230
}
230
231
return ;
231
232
}
You can’t perform that action at this time.
0 commit comments