mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[Flare] Fix isTouchEvent (#15824)
This commit is contained in:
Vendored
+2
-1
@@ -467,7 +467,8 @@ function calculateResponderRegion(
|
||||
}
|
||||
|
||||
function isTouchEvent(nativeEvent: Event): boolean {
|
||||
return Array.isArray((nativeEvent: any).changedTouches);
|
||||
const changedTouches = ((nativeEvent: any): TouchEvent).changedTouches;
|
||||
return changedTouches && typeof changedTouches.length === 'number';
|
||||
}
|
||||
|
||||
function getTouchFromPressEvent(nativeEvent: TouchEvent): Touch {
|
||||
|
||||
Reference in New Issue
Block a user