Explorar el Código

Fix null legacy tweet crash

Fixes #1383
Zed hace 5 meses
padre
commit
3429667414
Se han modificado 1 ficheros con 1 adiciones y 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