From 67ccbed911b76a66670facec5b10e8b0fc4b889e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 4 Oct 2022 14:56:22 +0200 Subject: Don't calculate human date for non-existing ctime field. --- server.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'server.js') 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, -- cgit v1.2.3