We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6822be commit ec96ae7Copy full SHA for ec96ae7
lib/path.js
@@ -368,20 +368,19 @@ const win32 = {
368
if (args.length === 0)
369
return '.';
370
371
- let joined;
372
- let firstPart;
373
- for (let i = 0; i < args.length; ++i) {
374
- const arg = args[i];
+ let joined = null;
+ let firstPart = null;
+ for (const arg of args) {
375
validateString(arg, 'path');
376
if (arg.length > 0) {
377
- if (joined === undefined)
+ if (joined === null)
378
joined = firstPart = arg;
379
else
380
joined += `\\${arg}`;
381
}
382
383
384
385
386
387
// Make sure that the joined path doesn't start with two slashes, because
0 commit comments