Overwrite only when necesary

This commit is contained in:
koalasat
2025-05-21 12:48:28 +02:00
parent 47a7281e30
commit 4a48782288

View File

@ -61,7 +61,7 @@ const App = (): React.JSX.Element => {
}; };
}; };
if (typeof window !== 'undefined') { if (typeof window !== 'undefined' && !window.crypto.subtle) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
(window as any).crypto = { (window as any).crypto = {
getRandomValues: (arr: Uint8Array): Uint8Array => { getRandomValues: (arr: Uint8Array): Uint8Array => {