thread_autoupdater.js: fix for threads with only an op

This commit is contained in:
Jon 2024-02-25 22:58:24 +00:00
parent 97ff7914bb
commit d9a2cd78e0
No known key found for this signature in database
GPG Key ID: 0175F5C9B8E9F984
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ $().ready(() => {
if (res.ok) { if (res.ok) {
const dom = parser.parseFromString(await res.text(), "text/html") 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 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 = [] const missingPCList = []
for (const pc of livePCList.reverse()) { for (const pc of livePCList.reverse()) {