check if beatmap is not null
This commit is contained in:
parent
c4d9862860
commit
22815e74b6
5
main.js
5
main.js
|
@ -102,7 +102,10 @@ function startOsuStatus() {
|
|||
let infoText = currentStatus.player_status.status.info_text.length > 0
|
||||
? currentStatus.player_status.status.info_text
|
||||
: " ";
|
||||
if ("beatmap" in currentStatus.player_status.status) {
|
||||
if (
|
||||
"beatmap" in currentStatus.player_status.status &&
|
||||
currentStatus.player_status.status.beatmap !== null
|
||||
) {
|
||||
const setId = currentStatus.player_status.status.beatmap.set_id;
|
||||
const coverImage =
|
||||
`https://assets.ppy.sh/beatmaps/${setId}/covers/list@2x.jpg`;
|
||||
|
|
Loading…
Reference in New Issue
Block a user