Do not warn if `touch.force` is NaN
Reviewed By: jingc Differential Revision: D4956972 fbshipit-source-id: e0d4d55e4e7ee352a8fc88a4cfd43dc3cabc9c48
This commit is contained in:
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue