From fe73857cdbcf5d18eafbdb7a883099a8c2cbfa7b Mon Sep 17 00:00:00 2001 From: julian laplace Date: Wed, 26 Oct 2022 18:58:07 +0200 Subject: missing thread? --- public/assets/js/lib/views/stream/hootstream.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'public') diff --git a/public/assets/js/lib/views/stream/hootstream.js b/public/assets/js/lib/views/stream/hootstream.js index bfdf5d1..7f4ff88 100644 --- a/public/assets/js/lib/views/stream/hootstream.js +++ b/public/assets/js/lib/views/stream/hootstream.js @@ -120,6 +120,11 @@ var HootStream = View.extend({ }, renderThread: function ({ thread, comments, files, images }) { + if (!thread?.length) { + console.error("Missing thread"); + console.error(thread, comments, files, images); + return ["
Missing thread!
"]; + } thread = thread.shift(); // console.log(thread, comments, files, images); const postedToday = +new Date() / 1000 - thread.lastmodified < 86400; -- cgit v1.2.3-70-g09d2