Skip to content

Commit

Permalink
perf: make normalizing cwd lighter
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Aug 1, 2022
1 parent 7b786d9 commit b371f9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const resolve: typeof path.resolve = function (...args) {
let resolvedAbsolute = false

for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
const path = i >= 0 ? args[i] : normalize(process.cwd())
const path = i >= 0 ? args[i] : process.cwd().replace(/\\/g, '/')

// Skip empty entries
if (path.length === 0) {
Expand Down

0 comments on commit b371f9f

Please sign in to comment.