File tree 3 files changed +9
-6
lines changed
app/javascript/mastodon/features
3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -108,10 +108,10 @@ class Results extends PureComponent {
108
108
return (
109
109
< >
110
110
< div className = 'account__section-headline' >
111
- < button onClick = { this . handleSelectAll } className = { type === 'all' && 'active' } > < FormattedMessage id = 'search_results.all' defaultMessage = 'All' /> </ button >
112
- < button onClick = { this . handleSelectAccounts } className = { type === 'accounts' && 'active' } > < FormattedMessage id = 'search_results.accounts' defaultMessage = 'Profiles' /> </ button >
113
- < button onClick = { this . handleSelectHashtags } className = { type === 'hashtags' && 'active' } > < FormattedMessage id = 'search_results.hashtags' defaultMessage = 'Hashtags' /> </ button >
114
- < button onClick = { this . handleSelectStatuses } className = { type === 'statuses' && 'active' } > < FormattedMessage id = 'search_results.statuses' defaultMessage = 'Posts' /> </ button >
111
+ < button onClick = { this . handleSelectAll } className = { type === 'all' ? 'active' : undefined } > < FormattedMessage id = 'search_results.all' defaultMessage = 'All' /> </ button >
112
+ < button onClick = { this . handleSelectAccounts } className = { type === 'accounts' ? 'active' : undefined } > < FormattedMessage id = 'search_results.accounts' defaultMessage = 'Profiles' /> </ button >
113
+ < button onClick = { this . handleSelectHashtags } className = { type === 'hashtags' ? 'active' : undefined } > < FormattedMessage id = 'search_results.hashtags' defaultMessage = 'Hashtags' /> </ button >
114
+ < button onClick = { this . handleSelectStatuses } className = { type === 'statuses' ? 'active' : undefined } > < FormattedMessage id = 'search_results.statuses' defaultMessage = 'Posts' /> </ button >
115
115
</ div >
116
116
117
117
< div className = 'explore__search-results' >
Original file line number Diff line number Diff line change @@ -568,7 +568,7 @@ class Status extends ImmutablePureComponent {
568
568
onMoveUp = { this . handleMoveUp }
569
569
onMoveDown = { this . handleMoveDown }
570
570
contextType = 'thread'
571
- previousId = { i > 0 && list . get ( i - 1 ) }
571
+ previousId = { i > 0 ? list . get ( i - 1 ) : undefined }
572
572
nextId = { list . get ( i + 1 ) || ( ancestors && statusId ) }
573
573
rootId = { statusId }
574
574
/>
Original file line number Diff line number Diff line change @@ -115,7 +115,10 @@ export default class ModalRoot extends PureComponent {
115
115
{ visible && (
116
116
< >
117
117
< BundleContainer fetchComponent = { MODAL_COMPONENTS [ type ] } loading = { this . renderLoading ( type ) } error = { this . renderError } renderDelay = { 200 } >
118
- { ( SpecificComponent ) => < SpecificComponent { ...props } onChangeBackgroundColor = { this . setBackgroundColor } onClose = { this . handleClose } ref = { this . setModalRef } /> }
118
+ { ( SpecificComponent ) => {
119
+ const ref = typeof SpecificComponent !== 'function' ? this . setModalRef : undefined ;
120
+ return < SpecificComponent { ...props } onChangeBackgroundColor = { this . setBackgroundColor } onClose = { this . handleClose } ref = { ref } />
121
+ } }
119
122
</ BundleContainer >
120
123
121
124
< Helmet >
You can’t perform that action at this time.
0 commit comments