Skip to content

Commit

Permalink
Hotfix bad this context when calling actions
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocascio committed Mar 15, 2018
1 parent 7486366 commit b9db8f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ export default class Actions extends React.Component {
cancelButtonIndex,
tintColor: this.props.optionTintColor,
},
function handle(buttonIndex) {
(buttonIndex) => {
let i = 0;
Object.keys(this.props.options).forEach(function launch(key) {
Object.keys(this.props.options).forEach((key) => {
if (this.props.options[key]) {
if (buttonIndex === i) {
this.props.options[key](this.props);
Expand Down

0 comments on commit b9db8f8

Please sign in to comment.