mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-17 19:33:12 +08:00
Do not warn if touch.force is NaN
Reviewed By: jingc Differential Revision: D4956972 fbshipit-source-id: e0d4d55e4e7ee352a8fc88a4cfd43dc3cabc9c48
This commit is contained in:
committed by
Facebook Github Bot
parent
19e1ef9042
commit
91be5bfc86
@@ -166,7 +166,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithTarget:(id)target action:(SEL)action
|
||||
// should we expose a `normalTouchForce` constant somewhere (which would
|
||||
// have a value of `1.0 / nativeTouch.maximumPossibleForce`)?
|
||||
if (RCTForceTouchAvailable()) {
|
||||
reactTouch[@"force"] = @(RCTSanitizeNaNValue(nativeTouch.force / nativeTouch.maximumPossibleForce, @"touchEvent.force"));
|
||||
reactTouch[@"force"] = @(RCTZeroIfNaN(nativeTouch.force / nativeTouch.maximumPossibleForce));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user