We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a13fc91 commit e154281Copy full SHA for e154281
2 files changed
packages/core/src/__tests__/util.test.ts
@@ -172,7 +172,7 @@ describe('getURL function', () => {
172
});
173
174
it('should return the root URL when the path is empty', () => {
175
- expect(getURL('www.example.com', '')).toBe('https://www.example.com/');
+ expect(getURL('www.example.com', '')).toBe('https://www.example.com');
176
177
178
it('should handle query parameters correctly in the URL path', () => {
packages/core/src/util.ts
@@ -259,9 +259,6 @@ export const createPromise = <T>(
259
};
260
261
export function getURL(host: string, path: string) {
262
- if (path === '') {
263
- path = '/'; // Ensure a trailing slash if path is empty
264
- }
265
if (!host.startsWith('https://') && !host.startsWith('http://')) {
266
host = 'https://' + host;
267
}
0 commit comments