Fix `Missing hash key: "selected" (KeyError)`

このコミットが含まれているのは:
11tuvork28 2022-07-03 14:03:42 +02:00
コミット 15d2cfba90
1個のファイルの変更1行の追加1行の削除

ファイルの表示

@ -84,7 +84,7 @@ end
def extract_selected_tab(tabs)
# Extract the selected tab from the array of tabs Youtube returns
return selected_target = tabs.as_a.select(&.["tabRenderer"]?.try &.["selected"].as_bool)[0]["tabRenderer"]
return selected_target = tabs.as_a.select(&.["tabRenderer"]?.try &.["selected"]?.try &.as_bool)[0]["tabRenderer"]
end
def fetch_continuation_token(items : Array(JSON::Any))