Skip to content

Commit d3b7f73

Browse files
committed
Refactor: update import paths for parseWinPath and integrate it into joinUrl function
1 parent ee5af88 commit d3b7f73

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: src/helpers/parseWinPath.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isWindows } from '../utils';
1+
import { isWindows } from '../utils/isWindows';
22

33
export const parseWinPath = (path: string | undefined): string => {
44
path = path?.split(`\\`).join(`/`) || '';

Diff for: src/utils/joinUrl.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { urlJoin } from 'url-join-ts';
2+
import { parseWinPath } from '../helpers';
23

34
export const joinUrl = (baseUrl: string | undefined, ...paths: any[]): string => {
45
const url = urlJoin(baseUrl, ...paths);
@@ -9,5 +10,5 @@ export const joinUrl = (baseUrl: string | undefined, ...paths: any[]): string =>
910
return url + '/';
1011
}
1112

12-
return url;
13+
return parseWinPath(url);
1314
};

0 commit comments

Comments
 (0)