When I attempted to retrieve the value using the question mark operator instead of using return twice, I encountered an error stating "Cannot read property 'omitDescription' of undefined."
buttonText() {
return this.omitDescription ? 'プロフィールをもっと見る' : 'プロフィールを閉じる'
// return function() {
// if(this.omitDescription) {
// return 'プロフィールをもっと見る'
// } else {
// return 'プロフィールを閉じる'
// }
// }
}
The part that was commented out seemed to work fine, leaving me puzzled about the difference. Thank you!