fix sorting

This commit is contained in:
Elijah R 2024-02-02 20:41:34 -05:00 committed by Elijah R
parent bb08e50003
commit f5e30a60b1

View File

@ -352,7 +352,7 @@ function loadList() {
function sortVMList() { function sortVMList() {
cards.sort(function(a, b) { cards.sort(function(a, b) {
return a.children[0].getAttribute("data-cvm-node")! > b.id ? 1 : -1; return a.getAttribute("data-cvm-node")! > b.getAttribute("data-cvm-node")! ? 1 : -1;
}); });
elements.vmlist.children[0].innerHTML = ""; elements.vmlist.children[0].innerHTML = "";
cards.forEach((c) => elements.vmlist.children[0].appendChild(c)); cards.forEach((c) => elements.vmlist.children[0].appendChild(c));