Skip to content

Commit 4aae1fd

Browse files
author
sachin-maheshwari
authored
Merge pull request #291 from rakibansary/feat/social-login
fix: handle missing onboarding_checklist traits
2 parents e33ddc0 + 00b676f commit 4aae1fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web-assets/auth0/dev-tenant/rules/onboardingChecklist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ function (user, context, callback) {
122122
}
123123
}
124124

125-
const profileCompletedData = onboardingChecklistTrait.data[0].profile_completed;
125+
const profileCompletedData = onboardingChecklistTrait.data.length > 0 ? onboardingChecklistTrait.data[0].profile_completed : null;
126126

127127
if (profileCompletedData) {
128128
if (profileCompletedData.status === "completed") {

0 commit comments

Comments
 (0)