Page MenuHomePhabricator

D10554.id35294.diff
No OneTemporary

D10554.id35294.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
Sat, Sep 21, 8:41 AM (22 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2158950
Default Alt Text
D10554.id35294.diff (960 B)

Event Timeline