summaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-10-04 14:56:22 +0200
committerTor Andersson <tor@ccxvii.net>2022-10-05 17:36:50 +0200
commit67ccbed911b76a66670facec5b10e8b0fc4b889e (patch)
tree03ba65f172bff18e5dc42175424f62ccdc84e442 /server.js
parentf972745ac092a1657d40d9fb01f7c68508a7c416 (diff)
downloadserver-67ccbed911b76a66670facec5b10e8b0fc4b889e.tar.gz
Don't calculate human date for non-existing ctime field.
Diffstat (limited to 'server.js')
-rw-r--r--server.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/server.js b/server.js
index 1197275..2014160 100644
--- a/server.js
+++ b/server.js
@@ -889,10 +889,8 @@ function show_forum_page(req, res, page) {
let thread_count = FORUM_COUNT_THREADS.get()
let page_count = Math.ceil(thread_count / FORUM_PAGE_SIZE)
let threads = FORUM_LIST_THREADS.all(FORUM_PAGE_SIZE, FORUM_PAGE_SIZE * (page - 1))
- for (let thread of threads) {
- thread.ctime = human_date(thread.ctime)
+ for (let thread of threads)
thread.mtime = human_date(thread.mtime)
- }
res.render('forum_view.pug', {
user: req.user,
threads: threads,