Skip to content

Commit 0bb81df

Browse files
authored
[Bugfix] Remove unreachable code (#5520)
1 parent a5f8964 commit 0bb81df

17 files changed

Lines changed: 18 additions & 21 deletions
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "",
5+
"comment": "Remove unreachable code",
6+
"packageName": "@azure/communication-react",
7+
"email": "77021369+jimchou-dev@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "",
5+
"comment": "Remove unreachable code",
6+
"packageName": "@azure/communication-react",
7+
"email": "77021369+jimchou-dev@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

packages/calling-component-bindings/src/handlers/createHandlers.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { _toCommunicationIdentifier } from '@internal/acs-ui-common';
1515
import { DeclarativeCallAgent } from '@internal/calling-stateful-client';
1616
import { StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';
1717
import memoizeOne from 'memoize-one';
18-
import { isACSCallParticipants } from '../utils/callUtils';
1918
import { createLocalVideoStream } from '../utils/callUtils';
2019
import { createDefaultCommonCallingHandlers, CommonCallingHandlers } from './createCommonHandlers';
2120

@@ -83,10 +82,6 @@ export const createDefaultCallingHandlers: CreateDefaultCallingHandlers = memoiz
8382
// FIXME: onStartCall API should use string, not the underlying SDK types.
8483
onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions): Call | undefined => {
8584
return callAgent?.startCall(participants, options);
86-
if (!isACSCallParticipants(participants)) {
87-
throw new Error('TeamsUserIdentifier in Teams call is not supported!');
88-
}
89-
return callAgent?.startCall(participants, options);
9085
},
9186
onAddParticipant: async (
9287
userId: string | CommunicationIdentifier,

packages/calling-component-bindings/src/participantListSelector.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const convertRemoteParticipantsToParticipantListParticipants = (
4343
// Filter out MicrosoftBot participants
4444
.filter((participant: RemoteParticipantState) => {
4545
return !isMicrosoftTeamsAppIdentifier(participant.identifier);
46-
return true;
4746
})
4847
/**
4948
* hiding participants who are inLobby, idle, or connecting in ACS clients till we can admit users through ACS clients.

packages/react-components/src/components/ChatMessage/ChatMessageContent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ export const getAttachmentCountLiveMessage = (
244244
return _formatString(attachmentCardGroupMessage, {
245245
attachmentCount: `${attachments.length}`
246246
});
247-
return '';
248247
};
249248

250249
const defaultOnRenderInlineImage = (inlineImage: InlineImage): JSX.Element => {

packages/react-components/src/components/LocalVideoTile.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ export const _LocalVideoTile = React.memo(
154154
return {
155155
contextualMenu: contextualMenuProps
156156
};
157-
return {};
158157
}, [contextualMenuProps, menuKind]);
159158

160159
const videoTileStyles = useMemo(() => {

packages/react-components/src/components/VideoGallery.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ export const VideoGallery = (props: VideoGalleryProps): JSX.Element => {
508508

509509
const showDisplayNameTrampoline = (): string => {
510510
return layout === 'default' ? strings.localVideoLabel : isNarrow ? '' : strings.localVideoLabel;
511-
return isNarrow ? '' : strings.localVideoLabel;
512511
};
513512

514513
return (

packages/react-components/src/components/VideoGallery/DefaultLayout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,4 @@ const overflowGalleryTrampoline = (
150150
galleryPosition?: 'horizontalBottom' | 'verticalRight' | 'horizontalTop'
151151
): JSX.Element | null => {
152152
return galleryPosition !== 'horizontalTop' ? gallery : <></>;
153-
return gallery;
154153
};

packages/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,5 +240,4 @@ const overflowGalleryTrampoline = (
240240
galleryPosition?: 'horizontalBottom' | 'verticalRight' | 'horizontalTop'
241241
): JSX.Element | null => {
242242
return galleryPosition !== 'horizontalTop' ? gallery : <></>;
243-
return gallery;
244243
};

packages/react-components/src/components/VideoGallery/SpeakerVideoLayout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,5 +208,4 @@ const overflowGalleryTrampoline = (
208208
galleryPosition?: 'horizontalBottom' | 'verticalRight' | 'horizontalTop'
209209
): JSX.Element | null => {
210210
return galleryPosition !== 'horizontalTop' ? gallery : <></>;
211-
return gallery;
212211
};

0 commit comments

Comments
 (0)