浏览代码

Fix empty image URLs in photo rail

Zed 1 年之前
父节点
当前提交
54ba1e30b5
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/parser.nim

+ 2 - 1
src/parser.nim

@@ -456,7 +456,8 @@ proc parseGraphPhotoRail*(js: JsonNode): PhotoRail =
               elif t.card.isSome: get(t.card).image
               else: ""
 
-            result.add GalleryPhoto(url: url, tweetId: $t.id)
+            if url.len > 0:
+              result.add GalleryPhoto(url: url, tweetId: $t.id)
 
             if result.len == 16:
               break