revert D4656347 to fix crashes

Reviewed By: jingc

Differential Revision: D4659669

fbshipit-source-id: 2c95c212a19cc8b67ce4ec62963c8374aecb3ef6
This commit is contained in:
Jiajie Zhu
2017-03-06 11:13:49 -08:00
committed by Facebook Github Bot
parent 8f0c16d7af
commit b87f4abf78
6 changed files with 23 additions and 85 deletions

View File

@@ -2187,13 +2187,7 @@ function attachNativeEvent(viewRef: any, eventName: string, argMapping: Array<?M
return {
detach() {
eventMappings.forEach((mapping) => {
NativeAnimatedAPI.removeAnimatedEventFromView(
viewTag,
eventName,
mapping.animatedValueTag,
);
});
NativeAnimatedAPI.removeAnimatedEventFromView(viewTag, eventName);
},
};
}