Skip to content

Commit d249220

Browse files
authored
fix(performance): simplify extractSpanURLString method (#63153)
1 parent 6aed53f commit d249220

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

static/app/components/events/interfaces/performance/spanEvidenceKeyValueList.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -652,12 +652,9 @@ function formatChangingQueryParameters(spans: Span[], baseURL?: string): string[
652652
* and instead it should use the data provided by the backend
653653
*/
654654
export const extractSpanURLString = (span: Span, baseURL?: string): URL | null => {
655-
let URLString;
656-
657-
URLString = span?.data?.url;
658-
if (URLString) {
659-
let url = span?.data?.url ?? '';
660-
const query = span?.data?.['http.query'];
655+
let url = span?.data?.url;
656+
if (url) {
657+
const query = span.data['http.query'];
661658
if (query) {
662659
url += `?${query}`;
663660
}
@@ -669,7 +666,6 @@ export const extractSpanURLString = (span: Span, baseURL?: string): URL | null =
669666
}
670667

671668
const [_method, _url] = (span?.description ?? '').split(' ', 2);
672-
URLString = _url;
673669

674670
return safeURL(_url, baseURL) ?? null;
675671
};

0 commit comments

Comments
 (0)