🐛(frontend) revert || to ?? operator for metadata parsing
Fix broken parsing when metadata contains empty strings. Nullish coalescing operator (??) doesn't handle empty strings like logical OR (||) does.
This commit is contained in:
committed by
aleb_the_flash
parent
e6754b49e0
commit
9c840a4e06
@@ -9,7 +9,7 @@ type useRaisedHandProps = {
|
||||
export function useRaisedHand({ participant }: useRaisedHandProps) {
|
||||
// fixme - refactor this part to rely on attributes
|
||||
const { metadata } = useParticipantInfo({ participant })
|
||||
const parsedMetadata = JSON.parse(metadata ?? '{}')
|
||||
const parsedMetadata = JSON.parse(metadata || '{}')
|
||||
|
||||
const toggleRaisedHand = () => {
|
||||
if (isLocal(participant)) {
|
||||
|
||||
Reference in New Issue
Block a user