From f79020c95d025a7e68f7f7b4b085ee954be4577a Mon Sep 17 00:00:00 2001 From: Captain ALM Date: Sat, 30 Jul 2022 21:11:29 +0100 Subject: [PATCH] Fix sorting object target bug. --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 10e2b2f..a92940f 100644 --- a/index.js +++ b/index.js @@ -249,8 +249,10 @@ function EntrySort(o, s) { ReplaceHistory(url+"?"+TheParameters) } for (var i = 0; i < EntryIndices.length; i++) { - tNode = EntryData[EntryIndices[i]].parentNode.removeChild(EntryData[EntryIndices[i]]) - EntryData[EntryIndices[i]].parentNode.appendChild(tNode) + var tNode = document.getElementById("entry-"+EntryIndices[i]) + var pNode = tNode.parentNode + tNode = pNode.removeChild(tNode) + pNode.appendChild(tNode) } } }