use join instead of reduce and slice
This commit is contained in:
parent
8bf97d01c4
commit
9e80606606
1 changed files with 1 additions and 2 deletions
|
@ -276,8 +276,7 @@ const FileListing: FC<{ query?: ParsedUrlQuery }> = ({ query }) => {
|
|||
c =>
|
||||
`${baseUrl}/api/raw/?path=${path}/${encodeURIComponent(c.name)}${hashedToken ? `&odpt=${hashedToken}` : ''}`
|
||||
)
|
||||
.reduce((urls, cur) => urls + cur + '\n', '')
|
||||
.slice(0, -1)
|
||||
.join('\n')
|
||||
}
|
||||
|
||||
// Folder recursive download
|
||||
|
|
Loading…
Reference in a new issue