Skip to content

Commit

Permalink
5.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed May 10, 2022
1 parent eece9e6 commit 9fa079d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion 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
Expand Down
6 changes: 3 additions & 3 deletions src/js/LottieView.js
Expand Up @@ -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 = () => {
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 9fa079d

Please sign in to comment.