Fixed a really easy mistake

This commit is contained in:
RadoslavL 2024-08-16 14:05:13 +03:00
parent cab02d4959
commit 2d6b46c926

View File

@ -246,8 +246,8 @@ module Invidious::JSONify::APIv1
json.field "viewCountText", rv["short_view_count"]?
json.field "viewCount", rv["view_count"]?.try &.empty? ? nil : rv["view_count"].to_i64
json.field "published", rv["published"]?
if !rv[published].nil?
json.field "publishedText", translate(locale, "`x` ago", recode_date(rv[published], locale))
if !rv["published"].nil?
json.field "publishedText", translate(locale, "`x` ago", recode_date(rv["published"], locale))
else
json.field "publishedText", translate(locale, "`x` ago", "NaN")
end