Skip to content

Commit 504ffe2

Browse files
committed
Wrapped getAnimatedWithChildren prototype check in __DEV__ to ensure it doesn’t break minification/obfuscation builds
1 parent e41a9f8 commit 504ffe2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/AnimatedRegion.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
import {Animated} from 'react-native';
33

44
const AnimatedWithChildren = Object.getPrototypeOf(Animated.ValueXY);
5-
if (AnimatedWithChildren.name !== 'AnimatedWithChildren') console.error('AnimatedRegion could not obtain AnimatedWithChildren base class');
5+
if (__DEV__) {
6+
if (AnimatedWithChildren.name !== 'AnimatedWithChildren') console.error('AnimatedRegion could not obtain AnimatedWithChildren base class');
7+
}
68
// const __Animated = Object.getPrototypeOf(AnimatedWithChildren);
79
// if (__Animated.name !== 'Animated') console.error('AnimatedRegion could not obtain Animated base class');
810

0 commit comments

Comments
 (0)