From 9fa079d7c9b9e54edd64d9bca980c54b91fa9efd Mon Sep 17 00:00:00 2001 From: emilio Date: Tue, 10 May 2022 10:44:14 +0200 Subject: [PATCH] 5.1.1 --- CHANGELOG.md | 6 +++++- src/js/LottieView.js | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1f1f2e2..1f420184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,11 @@ +## 5.1.1 + +- Remove deprecated-react-native-prop-types import + ## 5.1.0 - Upgrade lottie-android dependency to 5.1.1 -- Fix ViewProTypes imports +- Fix ViewPropTypes imports - Support for remote animations - Support for dynamic text - Support changing lottie props for ongoing animations diff --git a/src/js/LottieView.js b/src/js/LottieView.js index a193c53a..4ca2c2c0 100644 --- a/src/js/LottieView.js +++ b/src/js/LottieView.js @@ -10,7 +10,6 @@ import { NativeModules, processColor, } from 'react-native'; -import { ViewPropTypes } from 'deprecated-react-native-prop-types'; import SafeModule from 'react-native-safe-modules'; const getNativeLottieViewForDesktop = () => { @@ -158,8 +157,9 @@ class LottieView extends React.PureComponent { const { style, source, autoSize, ...rest } = this.props; const sourceName = typeof source === 'string' ? source : undefined; - const sourceJson = (typeof source === 'object' && !source.uri) ? JSON.stringify(source) : undefined; - const sourceURL = (typeof source === 'object' && source.uri) ? source.uri : undefined; + const sourceJson = + typeof source === 'object' && !source.uri ? JSON.stringify(source) : undefined; + const sourceURL = typeof source === 'object' && source.uri ? source.uri : undefined; const aspectRatioStyle = sourceJson ? { aspectRatio: source.w / source.h } : undefined;