From 9e436d4f617808f647221cd8816c632192cdf431 Mon Sep 17 00:00:00 2001 From: Chintan Prajapati Date: Sat, 25 Nov 2023 20:09:10 -0600 Subject: [PATCH] Update index.tsx --- src/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 5f02c8f1..3bfba67d 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -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; }; @@ -108,7 +108,7 @@ export function usePlyr( destroy, params, }, - deps || [params.options, params.source] + deps ?? [params.options, params.source] ); }