Skip to content

Commit 70f938b

Browse files
authored
fix(node-fetch): Use stringified origin url (#13581)
Uses the stringified value of `origin` to call `.endsWith()`. closes #13574
1 parent ec7d9e3 commit 70f938b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/node/src/integrations/node-fetch.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ function getBreadcrumbData(request: FetchRequest): Partial<SanitizedRequestData>
192192
function getAbsoluteUrl(origin: string, path: string = '/'): string {
193193
const url = `${origin}`;
194194

195-
if (origin.endsWith('/') && path.startsWith('/')) {
195+
if (url.endsWith('/') && path.startsWith('/')) {
196196
return `${url}${path.slice(1)}`;
197197
}
198198

199-
if (!origin.endsWith('/') && !path.startsWith('/')) {
199+
if (!url.endsWith('/') && !path.startsWith('/')) {
200200
return `${url}/${path.slice(1)}`;
201201
}
202202

0 commit comments

Comments
 (0)