소스 검색

Fix status page crash

Zed 7 년 전
부모
커밋
08239a3fae
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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)