Skip to content

Commit 071812c

Browse files
committed
fix: default to react-native if SDK property does not exist
1 parent 33ebd69 commit 071812c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

package/src/components/Chat/Chat.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,11 @@ const ChatWithContext = <
187187

188188
useEffect(() => {
189189
if (client) {
190+
const sdkName = (SDK ? SDK.replace('stream-chat-', '') : 'react-native') as
191+
| 'react-native'
192+
| 'expo';
190193
client.sdkIdentifier = {
191-
name: SDK.replace('stream-chat-', '') as 'react-native' | 'expo',
194+
name: sdkName,
192195
version,
193196
};
194197
client.deviceIdentifier = { os: `${Platform.OS} ${Platform.Version}` };

0 commit comments

Comments
 (0)