client: fix null is not a valid url

This commit is contained in:
Johann150 2023-07-10 21:29:34 +02:00
parent 46660abb6a
commit 45112158b0
Signed by: Johann150
GPG Key ID: 9EE6577A2A06F8F1
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ fetch(`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${requestLang}`).the
icon = info.icon;
sitename = info.sitename;
fetching = false;
if (['http:', 'https:'].includes(new URL(info.player.url).protocol)) {
if (info.player.url != null && ['http:', 'https:'].includes(new URL(info.player.url).protocol)) {
player = info.player;
}
});