We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9434f9a commit 8ca823aCopy full SHA for 8ca823a
docs-v2/components/GlobalConnectProvider.jsx
@@ -20,13 +20,7 @@ import {
20
* Generate a UUID v4 for use as external_user_id
21
*/
22
function generateUUID() {
23
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
24
- const r = Math.random() * 16 | 0;
25
- const v = c === "x"
26
- ? r
27
- : (r & 0x3 | 0x8);
28
- return v.toString(16);
29
- });
+ return crypto.randomUUID();
30
}
31
32
// Create the context
0 commit comments