Skip to content

Commit 54ba1e3

Browse files
committed
Fix empty image URLs in photo rail
1 parent bc38315 commit 54ba1e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/parser.nim

+2-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,8 @@ proc parseGraphPhotoRail*(js: JsonNode): PhotoRail =
456456
elif t.card.isSome: get(t.card).image
457457
else: ""
458458

459-
result.add GalleryPhoto(url: url, tweetId: $t.id)
459+
if url.len > 0:
460+
result.add GalleryPhoto(url: url, tweetId: $t.id)
460461

461462
if result.len == 16:
462463
break

0 commit comments

Comments
 (0)