diff options
| author | RblSb <msrblsb@gmail.com> | 2023-04-23 12:34:38 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2023-04-23 12:34:38 +0300 |
| commit | 341ec5ce86d1220060f63d2681b6e8eae11ec488 (patch) | |
| tree | aa232347348a0bdc75814bed30e057c8af00d237 /src/client/players/Youtube.hx | |
| parent | b25ebe9ce888b516c6478be2592052a7916a736f (diff) | |
Use null coalescing op
Diffstat (limited to 'src/client/players/Youtube.hx')
| -rw-r--r-- | src/client/players/Youtube.hx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/players/Youtube.hx b/src/client/players/Youtube.hx index b370f24..a728012 100644 --- a/src/client/players/Youtube.hx +++ b/src/client/players/Youtube.hx @@ -79,7 +79,7 @@ class Youtube implements IPlayer { public function getVideoData(data:VideoDataRequest, callback:(data:VideoData) -> Void):Void { final url = data.url; - if (apiKey == null) apiKey = main.getYoutubeApiKey(); + apiKey ??= main.getYoutubeApiKey(); final id = extractVideoId(url); if (id == "") { getPlaylistVideoData(data, callback); |
