diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-01-20 09:56:54 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-01-20 10:03:36 -0600 |
| commit | 95bde7bb8ae8f90266f9c2dabd06d0fcea6e63f6 (patch) | |
| tree | bad2619f70fceea3e0a19f4f2cbef3e291326e58 | |
| parent | daa2329f8b7adc44f9cf424a56488136ee6a5b1f (diff) | |
| download | invidious-95bde7bb8ae8f90266f9c2dabd06d0fcea6e63f6.tar.gz invidious-95bde7bb8ae8f90266f9c2dabd06d0fcea6e63f6.tar.bz2 invidious-95bde7bb8ae8f90266f9c2dabd06d0fcea6e63f6.zip | |
Add handling for empty continuation
| -rw-r--r-- | src/invidious/comments.cr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index a5ea012c..87065b5f 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -227,7 +227,8 @@ def fetch_youtube_comments(id, continuation, proxies, format, locale) reply_count ||= 1 end - continuation = node_replies["continuations"].as_a[0]["nextContinuationData"]["continuation"].as_s + continuation = node_replies["continuations"]?.try &.as_a[0]["nextContinuationData"]["continuation"].as_s + continuation ||= "" json.field "replies" do json.object do |
