diff --git a/api/music.js b/api/music.js index cc0f59c9..89289f22 100644 --- a/api/music.js +++ b/api/music.js @@ -8,7 +8,7 @@ export default async (request) => { let weeksArr = [] let weeksString - if (weeks.includes(',')) { + if (weeks?.includes(',')) { weeksArr = weeks.split(',') } else { weeksString = weeks