Change from foreach to map for better performance

This commit is contained in:
Junior 2026-11-08 16:04:52 -05:00
parent 269e25c2e0
commit 78314ae950

View File

@ -102,9 +102,7 @@ function getFolderContents() {
redirectToLogin();
return;
}
data.contents.forEach(function(entry, index) {
$("#list").append(entry.div);
});
$("#list").html(data.contents.map(e => e.div).join(""));
toastr.remove();
},
error : function(xhr, stat, err) {