Explorar o código

Fix status page crash

Zed %!s(int64=7) %!d(string=hai) anos
pai
achega
08239a3fae
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/routes/timeline.nim

+ 1 - 1
src/routes/timeline.nim

@@ -100,7 +100,7 @@ proc createTimelineRouter*(cfg: Config) =
 
       let conversation = await getTweet(@"name", @"id", getAgent())
       if conversation == nil or conversation.tweet.id.len == 0:
-        if conversation.tweet.tombstone.len > 0:
+        if conversation != nil and conversation.tweet.tombstone.len > 0:
           resp Http404, showError(conversation.tweet.tombstone, cfg.title)
         else:
           resp Http404, showError("Tweet not found", cfg.title)