Page MenuHomePhabricator

D10554.diff
No OneTemporary

D10554.diff

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

Mime Type
text/plain
Expires
Tue, Dec 3, 6:48 AM (22 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2610651
Default Alt Text
D10554.diff (960 B)

Event Timeline