Explorar o código

Fix null legacy tweet crash

Fixes #1383
Zed hai 5 meses
pai
achega
3429667414
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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