Skip to content

Commit aa674a9

Browse files
fix: Add optional chaining to unverified user condition (#5190)
1 parent 17940ae commit aa674a9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/components/forms/wizard/basic-details-step.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default Component.extend(FormMixin, EventWizardMixin, {
8282
}),
8383

8484
isUserUnverified: computed('authManager.currentUser.isVerified', function() {
85-
return !this.authManager.currentUser.isVerified;
85+
return !this.authManager?.currentUser?.isVerified;
8686
}),
8787

8888
subTopics: computed('data.event.topic', function() {

app/components/forms/wizard/other-details-step.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export default Component.extend(FormMixin, EventWizardMixin, {
2929
}),
3030

3131
isUserUnverified: computed('authManager.currentUser.isVerified', function() {
32-
return !this.authManager.currentUser.isVerified;
32+
return !this.authManager?.currentUser?.isVerified;
3333
}),
3434

3535
showDraftButton: computed('data.event.state', function() {

app/components/public/ticket-list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default Component.extend(FormMixin, {
1515

1616
isUnverified: computed('session.isAuthenticated', 'authManager.currentUser.isVerified', function() {
1717
return this.session.isAuthenticated
18-
&& !this.authManager.currentUser.isVerified;
18+
&& !this.authManager?.currentUser?.isVerified;
1919
}),
2020

2121
shouldDisableOrderButton: computed('hasTicketsInOrder', 'isDonationPriceValid', 'isUnverified', function() {

0 commit comments

Comments
 (0)