Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DotLottie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ interface DotlottieNativeProps {
}

interface DotlottieReactNativeProps {
source: string | { uri: string };
source: string | number | { uri: string };
loop?: boolean;
autoplay?: boolean;
speed?: number;
Expand Down
2 changes: 1 addition & 1 deletion src/DotLottie.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export type Dotlottie = {
};

interface DotlottieReactNativeProps {
source: string | { uri: string };
source: string | number | { uri: string };
loop?: boolean;
autoplay?: boolean;
speed?: number;
Expand Down
4 changes: 3 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Image } from 'react-native';

function parseSource(source: { uri: string } | string): string | undefined {
function parseSource(
source: { uri: string } | string | number
): string | undefined {
const uri = (source as any).uri;

if (typeof source === 'object' && uri) {
Expand Down
Loading