diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-01-09 14:22:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-09 14:22:21 -0500 |
commit | 2f9b56eb3a3efc90b90d727303418c6c24ac2198 (patch) | |
tree | 0bb98e4533b3261eab5b3c8e76eacedbc3dbd910 /webapp/components/suggestion | |
parent | e090104587d07ae4b204044e910de93bce590cfb (diff) | |
download | chat-2f9b56eb3a3efc90b90d727303418c6c24ac2198.tar.gz chat-2f9b56eb3a3efc90b90d727303418c6c24ac2198.tar.bz2 chat-2f9b56eb3a3efc90b90d727303418c6c24ac2198.zip |
Fixed onBlur being called when not given as a prop (#5024)
Diffstat (limited to 'webapp/components/suggestion')
-rw-r--r-- | webapp/components/suggestion/suggestion_box.jsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webapp/components/suggestion/suggestion_box.jsx b/webapp/components/suggestion/suggestion_box.jsx index fb55b0588..e9f7c3699 100644 --- a/webapp/components/suggestion/suggestion_box.jsx +++ b/webapp/components/suggestion/suggestion_box.jsx @@ -64,7 +64,10 @@ export default class SuggestionBox extends React.Component { // Delay this slightly so that we don't clear the suggestions before we run click handlers on SuggestionList GlobalActions.emitClearSuggestions(this.suggestionId); }, 100); - this.props.onBlur(); + + if (this.props.onBlur) { + this.props.onBlur(); + } } handleChange(e) { |