diff options
Diffstat (limited to 'app/javascript/flavours/glitch/features/composer/textarea/suggestions')
-rw-r--r-- | app/javascript/flavours/glitch/features/composer/textarea/suggestions/index.js | 6 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/features/composer/textarea/suggestions/item/index.js | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/javascript/flavours/glitch/features/composer/textarea/suggestions/index.js b/app/javascript/flavours/glitch/features/composer/textarea/suggestions/index.js index 65ed2c18a..dc72585f2 100644 --- a/app/javascript/flavours/glitch/features/composer/textarea/suggestions/index.js +++ b/app/javascript/flavours/glitch/features/composer/textarea/suggestions/index.js @@ -18,9 +18,9 @@ export default function ComposerTextareaSuggestions ({ return ( <div className='composer--textarea--suggestions' - hidden={hidden || suggestions.isEmpty()} + hidden={hidden || !suggestions || suggestions.isEmpty()} > - {!hidden ? suggestions.map( + {!hidden && suggestions ? suggestions.map( (suggestion, index) => ( <ComposerTextareaSuggestionsItem index={index} @@ -39,5 +39,5 @@ ComposerTextareaSuggestions.propTypes = { hidden: PropTypes.bool, onSuggestionClick: PropTypes.func, suggestions: ImmutablePropTypes.list, - value: PropTypes.string, + value: PropTypes.number, }; diff --git a/app/javascript/flavours/glitch/features/composer/textarea/suggestions/item/index.js b/app/javascript/flavours/glitch/features/composer/textarea/suggestions/item/index.js index b78f99ee9..dc057e679 100644 --- a/app/javascript/flavours/glitch/features/composer/textarea/suggestions/item/index.js +++ b/app/javascript/flavours/glitch/features/composer/textarea/suggestions/item/index.js @@ -17,7 +17,7 @@ const assetHost = ((process || {}).env || {}).CDN_HOST || ''; const handlers = { // Handles a click on a suggestion. - click (e) { + handleClick (e) { const { index, onClick, @@ -40,7 +40,7 @@ export default class ComposerTextareaSuggestionsItem extends React.Component { // Rendering. render () { - const { click } = this.handlers; + const { handleClick } = this.handlers; const { selected, suggestion, @@ -51,7 +51,7 @@ export default class ComposerTextareaSuggestionsItem extends React.Component { return ( <div className={computedClass} - onMouseDown={click} + onMouseDown={handleClick} role='button' tabIndex='0' > |