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