Fis sorting issues 4/2

This commit is contained in:
Daniella / Tove 2022-01-17 09:08:26 +01:00 committed by GitHub
parent 373bb13aa3
commit aa95a9c6c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,7 +69,6 @@
<a style="position: absolute; bottom: 10px; right: 10px;" href="/"><button type="button">Home</button></a>
<div class="posts">
<%- (function(){
let ret = ''
let mainPost = post
let id = postid == -1 ? -2 : 0
function recurse(post) {
@ -104,15 +103,13 @@
}
else
r += `<a href="/post/${id}">[Open]</a></div>`
ret = r + ret
for(const comment of post.comments) {
recurse(comment)
r = recurse(comment) + r
}
ret = '</post>' + ret
r += '</post>'
return r
}
recurse(post)
return ret
return recurse(post)
})() %>
</div>
<body>