summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorjulian laplace <julescarbon@gmail.com>2022-10-26 18:58:07 +0200
committerjulian laplace <julescarbon@gmail.com>2022-10-26 18:58:07 +0200
commitfe73857cdbcf5d18eafbdb7a883099a8c2cbfa7b (patch)
tree0eeb9915ea9edb92e180d1f221ea092bc51db6fc /public
parentb05925febcabb4caa5e1f5d4503f7ddd23708b26 (diff)
missing thread?
Diffstat (limited to 'public')
-rw-r--r--public/assets/js/lib/views/stream/hootstream.js5
1 files changed, 5 insertions, 0 deletions
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 ["<div>Missing thread!</div>"];
+ }
thread = thread.shift();
// console.log(thread, comments, files, images);
const postedToday = +new Date() / 1000 - thread.lastmodified < 86400;