Skip to content

Commit f1f2e05

Browse files
committed
refactor: use ArrayPrototypePush for path array manipulation
1 parent b77afc0 commit f1f2e05

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/path.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
const {
2525
ArrayPrototypeIncludes,
2626
ArrayPrototypeJoin,
27+
ArrayPrototypePush,
2728
ArrayPrototypeSlice,
2829
FunctionPrototypeBind,
2930
StringPrototypeCharCodeAt,
@@ -511,13 +512,13 @@ const win32 = {
511512
const arg = args[i];
512513
validateString(arg, 'path');
513514
if (arg.length > 0) {
514-
path.push(arg);
515+
ArrayPrototypePush(path, arg);
515516
}
516517
}
517518

518519
if (path.length === 0)
519520
return '.';
520-
521+
521522
const firstPart = path[0];
522523
let joined = ArrayPrototypeJoin(path, '\\');
523524

0 commit comments

Comments
 (0)