Skip to content

Commit b0deb5b

Browse files
skjnldsvsusnux
andauthored
fix: use globalThis
Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
1 parent edb52be commit b0deb5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/guest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ export function setGuestNickname(nickname: string): void {
8383
*/
8484
function randomUUID(): string {
8585
// Use the crypto API if available
86-
if (self?.crypto?.randomUUID) {
87-
return self.crypto.randomUUID()
86+
if (globalThis.crypto?.randomUUID) {
87+
return globalThis.crypto.randomUUID()
8888
}
8989

9090
// Generate a random UUID (version 4)

0 commit comments

Comments
 (0)