completionId: cgen-1099a38dee794d9e9572a16ca3ae4f14

cgen-1099a38dee794d9e9572a16ca3ae4f14
This commit is contained in:
Builder.io 2025-11-15 03:28:04 +00:00
parent d93fbab157
commit a92d574c30

View file

@ -191,10 +191,10 @@
<!-- Discord SDK is imported in DiscordActivityContext.tsx from @discord/embedded-app-sdk npm package -->
<!-- Polyfill for crypto.randomUUID for compatibility -->
<!-- Polyfill for crypto.randomUUID for compatibility - MUST run before any external scripts -->
<script>
if (!crypto.randomUUID) {
crypto.randomUUID = function () {
(function () {
const randomUUID = function () {
const array = new Uint8Array(16);
crypto.getRandomValues(array);
array[6] = (array[6] & 0x0f) | 0x40;
@ -210,7 +210,15 @@
hex.slice(10, 16).join(""),
].join("-");
};
}
if (!crypto.randomUUID) {
crypto.randomUUID = randomUUID;
}
if (!globalThis.crypto?.randomUUID) {
if (!globalThis.crypto) globalThis.crypto = {};
globalThis.crypto.randomUUID = randomUUID;
}
})();
</script>
</head>