Skip to content

Commit

Permalink
Correctly bind Touchable.js setTimeout
Browse files Browse the repository at this point in the history
Summary:
Fixes #5337

`this.setTimeout` is undefined and the scope wasn't being passed through causing a RedBox error.
Closes #5376

Reviewed By: svcscm

Differential Revision: D2838623

Pulled By: androidtrunkagent

fb-gh-sync-id: 513210298b6c39d812047a03d8f2edd5c11e46f6
  • Loading branch information
Ehesp authored and facebook-github-bot-0 committed Jan 22, 2016
1 parent 969c520 commit f644af3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Components/Touchable/Touchable.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ var TouchableMixin = {
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);
} else if (!newIsHighlight && curIsHighlight && this.touchableHandleActivePressOut) {
if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) {
this.pressOutDelayTimeout = this.setTimeout(function() {
this.pressOutDelayTimeout = setTimeout(() => {
this.touchableHandleActivePressOut(e);
}, this.touchableGetPressOutDelayMS());
} else {
Expand Down

0 comments on commit f644af3

Please sign in to comment.