Skip to content

Commit a94cc27

Browse files
marsonyaMylesBorins
authored andcommitted
path: refactor to use more primordials
PR-URL: #37893 Reviewed-By: Pooja D P <Pooja.D.P@ibm.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
1 parent d86aca9 commit a94cc27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/path.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const win32 = {
163163
// Verify that a cwd was found and that it actually points
164164
// to our drive. If not, default to the drive's root.
165165
if (path === undefined ||
166-
(StringPrototypeSlice(path, 0, 2).toLowerCase() !==
166+
(StringPrototypeToLowerCase(StringPrototypeSlice(path, 0, 2)) !==
167167
StringPrototypeToLowerCase(resolvedDevice) &&
168168
StringPrototypeCharCodeAt(path, 2) === CHAR_BACKWARD_SLASH)) {
169169
path = `${resolvedDevice}\\`;
@@ -1321,7 +1321,7 @@ const posix = {
13211321
return StringPrototypeSlice(path, startDot, end);
13221322
},
13231323

1324-
format: _format.bind(null, '/'),
1324+
format: FunctionPrototypeBind(_format, null, '/'),
13251325

13261326
parse(path) {
13271327
validateString(path, 'path');

0 commit comments

Comments
 (0)