Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
amar-1995 committed May 17, 2024
1 parent beec9d6 commit aa8fc06
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ export const AdminCaptionContent = ({
const actions = useHMSActions();
const isCaptionEnabled = useHMSStore(selectIsTranscriptionEnabled);

const transcriptionStates: HMSTranscriptionInfo[] = useHMSStore(selectTranscriptionsState);
const transcriptionStates: HMSTranscriptionInfo[] | undefined = useHMSStore(selectTranscriptionsState);

useEffect(() => {
if (transcriptionStates.length > 0) {
if (transcriptionStates && transcriptionStates.length > 0) {
if (
(transcriptionStates[0].state === HMSTranscriptionState.Stopped ||
transcriptionStates[0].state === HMSTranscriptionState.Failed) &&
(transcriptionStates[0].state === HMSTranscriptionState.STOPPED ||
transcriptionStates[0].state === HMSTranscriptionState.FAILED) &&
transcriptionStates[0].error
) {
ToastManager.addToast({
Expand Down

0 comments on commit aa8fc06

Please sign in to comment.