From 65366754f659ce150ab6b46a85d957678a63b6a3 Mon Sep 17 00:00:00 2001 From: hohMiyazawa Date: Sun, 7 Jul 2024 23:11:07 +0200 Subject: [PATCH] check response --- src/modules/anisongs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/anisongs.js b/src/modules/anisongs.js index b4fc26e..4562940 100644 --- a/src/modules/anisongs.js +++ b/src/modules/anisongs.js @@ -177,6 +177,9 @@ async function launch(currentid) { const {idMal: mal_id, status} = data.Media; if (mal_id) { const {data} = await API.getSongs(mal_id); + if(!data){ + return "No songs" + } let {openings: opening_themes, endings: ending_themes} = data; // add songs to cache if they're not empty and query videos if (opening_themes.length || ending_themes.length) {