mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-22 16:29:10 -04:00
Fix: YoutubeAPI.make_context(): client_config can be nil
This commit is contained in:
parent
ff3fce7afa
commit
c39413289a
@ -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…
x
Reference in New Issue
Block a user