From 9298c1a6741005d6d62adccbbe4d0d8715e33d02 Mon Sep 17 00:00:00 2001 From: Jon <134811123+jonsmy@users.noreply.github.com> Date: Sun, 25 Feb 2024 22:58:24 +0000 Subject: [PATCH] thread_autoupdater.js: fix for threads with only an op --- js/lcn/thread_autoupdater.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/lcn/thread_autoupdater.js b/js/lcn/thread_autoupdater.js index a65620cf..2acf50dd 100644 --- a/js/lcn/thread_autoupdater.js +++ b/js/lcn/thread_autoupdater.js @@ -71,7 +71,7 @@ $().ready(() => { if (res.ok) { const dom = parser.parseFromString(await res.text(), "text/html") const livePCList = Array.prototype.map.apply(dom.querySelectorAll(`#thread_${threadPost.getInfo().getThreadId()} > .postcontainer`), [ pc => LCNPostContainer.assign(pc) ]) - const documentPCList = threadReplies.map(p => p.getParent()) + const documentPCList = [ threadPost, ...threadReplies.map(p => p.getParent()) ] const missingPCList = [] for (const pc of livePCList.reverse()) {