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 untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

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;
}
});