diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-10-04 14:56:22 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-10-05 17:36:50 +0200 |
commit | 67ccbed911b76a66670facec5b10e8b0fc4b889e (patch) | |
tree | 03ba65f172bff18e5dc42175424f62ccdc84e442 /server.js | |
parent | f972745ac092a1657d40d9fb01f7c68508a7c416 (diff) | |
download | server-67ccbed911b76a66670facec5b10e8b0fc4b889e.tar.gz |
Don't calculate human date for non-existing ctime field.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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, |