Skip to content

Commit

Permalink
Fix browser parser check (#714)
Browse files Browse the repository at this point in the history
* Fix browser parser check

* Create quick-mails-drop.md
  • Loading branch information
lukasIO authored May 25, 2023
1 parent 2ca87f0 commit c7f4017
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/quick-mails-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"livekit-client": patch
---

Fix browser parser check
5 changes: 1 addition & 4 deletions src/utils/browserParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ let browserDetails: BrowserDetails | undefined;
* @internal
*/
export function getBrowser(userAgent?: string, force = true) {
if (
userAgent === undefined &&
(typeof document !== 'undefined' || typeof navigator === 'undefined')
) {
if (typeof userAgent === 'undefined' && typeof navigator === 'undefined') {
return;
}
const ua = (userAgent ?? navigator.userAgent).toLowerCase();
Expand Down

0 comments on commit c7f4017

Please sign in to comment.