Skip to content

Commit 96c9ce8

Browse files
sahrensfacebook-github-bot-5
authored andcommitted
Fix Text + TouchableWithoutFeedback
Summary: Arrow functions don't have `arguments`...whoops :( public Reviewed By: vjeux, ericvicenti Differential Revision: D2741448 fb-gh-sync-id: 15e9fb0446909e4cbbbb5e30024dde58d872e725
1 parent 96553cf commit 96c9ce8

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Libraries/Text/Text.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -181,35 +181,35 @@ const Text = React.createClass({
181181
}
182182
return setResponder;
183183
},
184-
onResponderGrant: (e: SyntheticEvent, dispatchID: string) => {
184+
onResponderGrant: function(e: SyntheticEvent, dispatchID: string) {
185185
this.touchableHandleResponderGrant(e, dispatchID);
186186
this.props.onResponderGrant &&
187187
this.props.onResponderGrant.apply(this, arguments);
188-
},
189-
onResponderMove: (e: SyntheticEvent) => {
188+
}.bind(this),
189+
onResponderMove: function(e: SyntheticEvent) {
190190
this.touchableHandleResponderMove(e);
191191
this.props.onResponderMove &&
192192
this.props.onResponderMove.apply(this, arguments);
193-
},
194-
onResponderRelease: (e: SyntheticEvent) => {
193+
}.bind(this),
194+
onResponderRelease: function(e: SyntheticEvent) {
195195
this.touchableHandleResponderRelease(e);
196196
this.props.onResponderRelease &&
197197
this.props.onResponderRelease.apply(this, arguments);
198-
},
199-
onResponderTerminate: (e: SyntheticEvent) => {
198+
}.bind(this),
199+
onResponderTerminate: function(e: SyntheticEvent) {
200200
this.touchableHandleResponderTerminate(e);
201201
this.props.onResponderTerminate &&
202202
this.props.onResponderTerminate.apply(this, arguments);
203-
},
204-
onResponderTerminationRequest: (): bool => {
203+
}.bind(this),
204+
onResponderTerminationRequest: function(): bool {
205205
// Allow touchable or props.onResponderTerminationRequest to deny
206206
// the request
207207
var allowTermination = this.touchableHandleResponderTerminationRequest();
208208
if (allowTermination && this.props.onResponderTerminationRequest) {
209-
allowTermination = this.props.onResponderTerminationRequest();
209+
allowTermination = this.props.onResponderTerminationRequest.apply(this, arguments);
210210
}
211211
return allowTermination;
212-
},
212+
}.bind(this),
213213
};
214214
}
215215
newProps = {

0 commit comments

Comments
 (0)