Skip to content

Commit f93c06d

Browse files
add optional chaining
1 parent 6b8a8a5 commit f93c06d

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

  • src/app/(routes)/student/profile

src/app/(routes)/student/profile/page.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,14 @@ const ProfilePage = () => {
200200

201201
// Check if onboarding is needed
202202
const needsOnboarding =
203-
studentData?.backlog == null ||
204-
studentData?.tenthMarks == null ||
205-
studentData?.twelthMarks == null ||
206-
studentData?.numberOfBacklogs == null;
203+
studentData?.backlog === undefined ||
204+
studentData?.backlog === null ||
205+
studentData?.tenthMarks === undefined ||
206+
studentData?.tenthMarks === null ||
207+
studentData?.twelthMarks === undefined ||
208+
studentData?.twelthMarks === null ||
209+
studentData?.numberOfBacklogs === undefined ||
210+
studentData?.numberOfBacklogs === null;
207211

208212
const isOnboardingComplete = !needsOnboarding;
209213

0 commit comments

Comments
 (0)