1
0
Fork 0

Add variable to closure to delete correct suggestion

This commit is contained in:
Aaron Lindsay 2017-01-01 21:17:44 -05:00
parent d8fdf68cbb
commit c4ea521e52
1 changed files with 2 additions and 1 deletions

View File

@ -67,8 +67,9 @@ module.exports = React.createClass({
if (i == 0) {
var self = this;
var localSuggestion = suggestion;
var popFunction = function(){
return function(){self.props.removeSuggestion(suggestion);};
return function(){self.props.removeSuggestion(localSuggestion);};
}();
suggestions.push((
<Row key={suggestion.SuggestionId}><Panel>