Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3400803
D10554.id35295.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
960 B
Referenced Files
None
Subscribers
None
D10554.id35295.diff
View Options
diff --git a/native/chat/swipeable-message.react.js b/native/chat/swipeable-message.react.js
--- a/native/chat/swipeable-message.react.js
+++ b/native/chat/swipeable-message.react.js
@@ -2,7 +2,6 @@
import type { IconProps } from '@expo/vector-icons';
import * as Haptics from 'expo-haptics';
-import invariant from 'invariant';
import * as React from 'react';
import { View } from 'react-native';
import {
@@ -233,10 +232,9 @@
ctx /*: { [string]: mixed } */,
) => {
const { translationAtStart } = ctx;
- invariant(
- typeof translationAtStart === 'number',
- 'translationAtStart should be number',
- );
+ if (typeof translationAtStart !== 'number') {
+ throw new Error('translationAtStart should be number');
+ }
const translationX = translationAtStart + event.translationX;
const baseActiveTranslation = isViewer
? Math.min(translationX, 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 8:59 AM (20 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2610651
Default Alt Text
D10554.id35295.diff (960 B)
Attached To
Mode
D10554: [native] Avoid calling invariant from worklet
Attached
Detach File
Event Timeline
Log In to Comment