mirror of
https://github.com/iv-org/invidious.git
synced 2024-08-30 18:23:25 +00:00
Fix non-existent 'content_html' on empty comment section
This commit is contained in:
parent
187fa11c4a
commit
a5fb1d38e0
@ -1708,7 +1708,12 @@ get "/api/v1/comments/:id" do |env|
|
||||
ctoken = body.match(/'COMMENTS_TOKEN': "(?<ctoken>[^"]+)"/)
|
||||
if !ctoken
|
||||
env.response.content_type = "application/json"
|
||||
|
||||
if format == "json"
|
||||
next {"comments" => [] of String}.to_json
|
||||
else
|
||||
next {"content_html" => ""}.to_json
|
||||
end
|
||||
end
|
||||
ctoken = ctoken["ctoken"]
|
||||
itct = body.match(/itct=(?<itct>[^"]+)"/).not_nil!["itct"]
|
||||
|
Loading…
Reference in New Issue
Block a user