Skip to content

Commit

Permalink
fix: if no usercourselist
Browse files Browse the repository at this point in the history
  • Loading branch information
jouwdan committed Aug 5, 2023
1 parent 7b6296a commit 97b71db
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const load = async ({ params, parent }) => {
.select(`course_list`)
.eq('id', data.session.user.id);

if (userCourseList.length === 0) {
if (!userCourseList || userCourseList.length === 0) {
// do something
} else {
const courseList = userCourseList[0].course_list;
Expand Down

0 comments on commit 97b71db

Please sign in to comment.