openvidu-react-native: Fixed crash with JSON parse
This commit is contained in:
parent
59438d2bf9
commit
d7b607c25a
@ -176,9 +176,11 @@ export default class App extends Component<Props> {
|
||||
|
||||
getNicknameTag(stream) {
|
||||
// Gets the nickName of the user
|
||||
if (stream.connection && JSON.parse(stream.connection.data) && JSON.parse(stream.connection.data).clientData) {
|
||||
return JSON.parse(stream.connection.data).clientData;
|
||||
}
|
||||
try {
|
||||
if (stream.connection && JSON.parse(stream.connection.data) && JSON.parse(stream.connection.data).clientData) {
|
||||
return JSON.parse(stream.connection.data).clientData;
|
||||
}
|
||||
} catch (error) { }
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user