Skip to content

Commit bfd70c9

Browse files
committed
path: change path.join to use array dynamic allocation
Change path.join to use array dynamic allocation instead of push. Refs: nodejs#54331
1 parent 0549590 commit bfd70c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/path.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,7 +1242,7 @@ const posix = {
12421242
const arg = args[i];
12431243
validateString(arg, 'path');
12441244
if (arg.length > 0) {
1245-
path.push(arg);
1245+
path[path.length] = arg;
12461246
}
12471247
}
12481248

0 commit comments

Comments
 (0)