소스 검색

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