From 95e96db324b60cf5f2d853eba2a168d36c17562a Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 9 Mar 2018 07:06:08 -0500 Subject: [PATCH] fix --- contrib/backends/srndv2/src/srnd/model_mem.go | 3 +++ contrib/templates/placebo/thread.mustache | 3 ++- contrib/templates/placebo/ukko.mustache | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/contrib/backends/srndv2/src/srnd/model_mem.go b/contrib/backends/srndv2/src/srnd/model_mem.go index 1ca0b5b..96e17cd 100644 --- a/contrib/backends/srndv2/src/srnd/model_mem.go +++ b/contrib/backends/srndv2/src/srnd/model_mem.go @@ -732,6 +732,9 @@ func (self *thread) HasOmittedImages() bool { } func (self *thread) BumpLock() bool { + if self.Posts == nil { + return false + } return len(self.Posts) >= BumpLimit } diff --git a/contrib/templates/placebo/thread.mustache b/contrib/templates/placebo/thread.mustache index cce0ed4..9709a2b 100644 --- a/contrib/templates/placebo/thread.mustache +++ b/contrib/templates/placebo/thread.mustache @@ -40,7 +40,8 @@
{{{form}}} {{#thread.BumpLock}} -
+
+ {{/thread.BumpLock}} {{^thread.BumpLock}}
{{/thread.BumpLock}} diff --git a/contrib/templates/placebo/ukko.mustache b/contrib/templates/placebo/ukko.mustache index cf08f7a..50d5e13 100644 --- a/contrib/templates/placebo/ukko.mustache +++ b/contrib/templates/placebo/ukko.mustache @@ -46,7 +46,8 @@
{{#threads}} {{#BumpLock}} -
+
+ {{/BumpLock}} {{^BumpLock}}
{{/BumpLock}}