Skip to content

Commit

Permalink
check response
Browse files Browse the repository at this point in the history
  • Loading branch information
hohMiyazawa committed Jul 7, 2024
1 parent 7f6553c commit 6536675
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/anisongs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6536675

Please sign in to comment.