Fix crash on invalid id and non-existent profiles

This commit is contained in:
Zed
2019-06-25 13:07:49 +02:00
parent 684489ee21
commit 8000a814df
2 changed files with 12 additions and 7 deletions

View File

@ -44,7 +44,7 @@ routes:
cond '.' notin @"name"
let conversation = await getTweet(@"id")
if conversation.tweet.id.len == 0:
if conversation.isNil or conversation.tweet.id.len == 0:
resp Http404, showError("Tweet not found")
let title = pageTitle(conversation.tweet.profile)