Browse Source

Fix null legacy tweet crash

Fixes #1383
Zed 5 months ago
parent
commit
3429667414
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/parser.nim

+ 1 - 1
src/parser.nim

@@ -314,7 +314,7 @@ proc parseCard(js: JsonNode; urls: JsonNode): Card =
 
 proc parseTweet(js: JsonNode; jsCard: JsonNode = newJNull();
                 replyId: int64 = 0): Tweet =
-  if js.isNull: return
+  if js.isNull: return Tweet()
 
   let time =
     if js{"created_at"}.notNull: js{"created_at"}.getTime