File tree Expand file tree Collapse file tree 2 files changed +1
-8
lines changed
packages/toolkit/src/query Expand file tree Collapse file tree 2 files changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,6 @@ describe('joinUrls', () => {
83
83
84
84
expect ( joinUrls ( '' , '/banana' ) ) . toBe ( '/banana' )
85
85
expect ( joinUrls ( '' , 'banana' ) ) . toBe ( 'banana' )
86
-
87
- expect ( joinUrls ( '/api' , '?foo=bar' ) ) . toBe ( '/api?foo=bar' )
88
86
} )
89
87
90
88
test ( 'correctly joins variations of absolute urls' , ( ) => {
@@ -101,10 +99,6 @@ describe('joinUrls', () => {
101
99
expect ( joinUrls ( 'https://example.com/api/' , '/banana/' ) ) . toBe (
102
100
'https://example.com/api/banana/'
103
101
)
104
-
105
- expect ( joinUrls ( 'https://example.com/api/' , '?foo=bar' ) ) . toBe (
106
- 'https://example.com/api?foo=bar'
107
- )
108
102
} )
109
103
} )
110
104
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ export function joinUrls(
20
20
21
21
base = withoutTrailingSlash ( base )
22
22
url = withoutLeadingSlash ( url )
23
- const delimiter = url . startsWith ( '?' ) ? '' : '/'
24
23
25
- return `${ base } ${ delimiter } ${ url } ` ;
24
+ return `${ base } / ${ url } `
26
25
}
You can’t perform that action at this time.
0 commit comments