Skip to content

Commit 0c30d15

Browse files
authored
Fix navigator access in ChatEntry (#1114)
1 parent 328ae64 commit 0c30d15

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/thin-shrimps-share.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@livekit/components-react": patch
3+
---
4+
5+
Fix navigator access in ChatEntry

packages/react/src/components/ChatEntry.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const ChatEntry: (
4545
}, [entry.message, messageFormatter]);
4646
const hasBeenEdited = !!entry.editTimestamp;
4747
const time = new Date(entry.timestamp);
48-
const locale = navigator ? navigator.language : 'en-US';
48+
const locale = typeof navigator !== 'undefined' ? navigator.language : 'en-US';
4949

5050
const name = entry.from?.name ?? entry.from?.identity;
5151

0 commit comments

Comments
 (0)