File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
src/shared/components/Settings/Preferences Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export default function Item({
38
38
</ div >
39
39
{
40
40
! isSubscribeForm ? (
41
- < a href = { link } styleName = "link-btn" > < span > { linkTitle } </ span > </ a >
41
+ < a href = { link } target = "_blank" rel = "noopener noreferrer" styleName = "link-btn" > < span > { linkTitle } </ span > </ a >
42
42
) : (
43
43
< form action = "https://topcoder.us13.list-manage.com/subscribe/post?u=65bd5a1857b73643aad556093&id=28bfd3c062" method = "post" id = "mc-embedded-subscribe-form" name = "mc-embedded-subscribe-form" noValidate >
44
44
< input type = "email" value = { email } readOnly name = "EMAIL" id = "mce-EMAIL" />
Original file line number Diff line number Diff line change @@ -59,12 +59,14 @@ export default class Preferences extends React.Component {
59
59
render ( ) {
60
60
const { profile : { email } , isSaving } = this . props ;
61
61
const { onboardingChecklistTrait } = this . state ;
62
-
63
- const traitData = onboardingChecklistTrait . traits . data [ 0 ] ;
64
62
let paymentSetupCompleted = false ;
65
- if ( _ . has ( traitData , 'user_payment_method' ) ) {
66
- paymentSetupCompleted = ! _ . isEmpty ( traitData . user_payment_method . payment_method )
67
- && traitData . user_payment_method . status === 'completed' ;
63
+
64
+ if ( onboardingChecklistTrait . traits && onboardingChecklistTrait . traits . data . length > 0 ) {
65
+ const traitData = onboardingChecklistTrait . traits . data [ 0 ] ;
66
+ if ( _ . has ( traitData , 'user_payment_method' ) ) {
67
+ paymentSetupCompleted = ! _ . isEmpty ( traitData . user_payment_method . payment_method )
68
+ && traitData . user_payment_method . status === 'completed' ;
69
+ }
68
70
}
69
71
70
72
const saveBtn = (
You can’t perform that action at this time.
0 commit comments