Merge pull request #16449 from Snuffleupagus/attachments-viewer-rm-sort

Stop trying to sort the attachments in the sidebar
This commit is contained in:
Tim van der Meij 2023-05-21 12:25:28 +02:00 committed by GitHub
commit d09c27d231
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,13 +109,10 @@ class PDFAttachmentViewer extends BaseTreeViewer {
this._dispatchEvent(/* attachmentsCount = */ 0);
return;
}
const names = Object.keys(attachments).sort(function (a, b) {
return a.toLowerCase().localeCompare(b.toLowerCase());
});
const fragment = document.createDocumentFragment();
let attachmentsCount = 0;
for (const name of names) {
for (const name in attachments) {
const item = attachments[name];
const content = item.content,
filename = getFilenameFromUrl(