Refactor nil checks, remove getAttr

This commit is contained in:
Zed
2019-06-27 21:07:29 +02:00
parent a43950dcf5
commit e2039ec81c
5 changed files with 48 additions and 52 deletions

View File

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