diff options
| author | julian laplace <julescarbon@gmail.com> | 2022-10-27 17:21:02 +0200 |
|---|---|---|
| committer | julian laplace <julescarbon@gmail.com> | 2022-10-27 17:21:02 +0200 |
| commit | dc09bf5307907bfcd46b7cf76893a4a87c156d65 (patch) | |
| tree | 880eabb4d24fcaa86c2857dbfbe231a783fa5fe6 /public/assets | |
| parent | adb9b1d5d87fbb1a1fea347b4d1aae7e67a3955d (diff) | |
file sorting
Diffstat (limited to 'public/assets')
| -rw-r--r-- | public/assets/js/lib/views/stream/hootstream.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/public/assets/js/lib/views/stream/hootstream.js b/public/assets/js/lib/views/stream/hootstream.js index 50b2f46..d13ae0a 100644 --- a/public/assets/js/lib/views/stream/hootstream.js +++ b/public/assets/js/lib/views/stream/hootstream.js @@ -344,7 +344,11 @@ var HootStream = View.extend({ return null; } const $table = $("<div class='fileList'>"); - for (const file of files.sort((file) => file.filename.toLowerCase())) { + const sortedFiles = files + .map((file) => [file.filename.toLowerCase(), file]) + .sort((a, b) => a[0].localeCompare(b[0])) + .map(([, file]) => file); + for (const file of sortedFiles) { const $el = this.renderFile(this.fileTemplate, file); $table.append($el); } |
