Skip to content

Commit

Permalink
Merge pull request #1121 from chintan9/codefix
Browse files Browse the repository at this point in the history
Update index.tsx
  • Loading branch information
chintan9 authored Nov 29, 2023
2 parents bed0757 + 9e436d4 commit 046ae33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ const instantiate: Instantiate<
PlyrConfigurationProps
> = (_, params) => {
// The node update of ref in react life cycle seems to have issue, used class selector instead
const plyr = new PlyrJS(".plyr-react", params!.options || {});
if (params!.source) plyr.source = params!.source;
const plyr = new PlyrJS(".plyr-react", params?.options ?? {});
if (params?.source) plyr.source = params?.source;
return plyr;
};

Expand Down Expand Up @@ -108,7 +108,7 @@ export function usePlyr(
destroy,
params,
},
deps || [params.options, params.source]
deps ?? [params.options, params.source]
);
}

Expand Down

0 comments on commit 046ae33

Please sign in to comment.