| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent fcf82ad commit 2859b4b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1237,20 +1237,20 @@ const posix = { | |||
| 1237 | 1237 | join(...args) { | |
| 1238 | 1238 | if (args.length === 0) | |
| 1239 | 1239 | return '.'; | |
| 1240 | - let joined; | ||
| 1240 | + | ||
| 1241 | + const path = []; | ||
| 1241 | 1242 | for (let i = 0; i < args.length; ++i) { | |
| 1242 | 1243 | const arg = args[i]; | |
| 1243 | 1244 | validateString(arg, 'path'); | |
| 1244 | 1245 | if (arg.length > 0) { | |
| 1245 | - if (joined === undefined) | ||
| 1246 | - joined = arg; | ||
| 1247 | - else | ||
| 1248 | - joined += `/${arg}`; | ||
| 1246 | + path.push(arg); | ||
| 1249 | 1247 | } | |
| 1250 | 1248 | } | |
| 1251 | - if (joined === undefined) | ||
| 1249 | + | ||
| 1250 | + if (path.length === 0) | ||
| 1252 | 1251 | return '.'; | |
| 1253 | - return posix.normalize(joined); | ||
| 1252 | + | ||
| 1253 | + return posix.normalize(ArrayPrototypeJoin(path, '/')); | ||
| 1254 | 1254 | }, | |
| 1255 | 1255 | ||
| 1256 | 1256 | /** | |
| Back | FazBrowse Home | New Git URL |
0 commit comments