mirror of
https://github.com/iv-org/invidious.git
synced 2025-05-30 03:45:47 -04:00
Fix: YoutubeAPI.make_context(): client_config can be nil
This commit is contained in:
parent
ff3fce7afa
commit
c39413289a
1 changed files with 4 additions and 1 deletions
|
@ -95,7 +95,10 @@ module YoutubeAPI
|
|||
# Return, as a Hash, the "context" data required to request the
|
||||
# youtube API endpoints.
|
||||
#
|
||||
private def make_context(client_config : ClientConfig) : Hash
|
||||
private def make_context(client_config : ClientConfig | Nil) : Hash
|
||||
# Use the default client config if nil is passed
|
||||
client_config ||= DEFAULT_CLIENT_CONFIG
|
||||
|
||||
return {
|
||||
"client" => {
|
||||
"hl" => "en",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue