From 352a4699d21d0764fe06cbc7b1031d0404c15b36 Mon Sep 17 00:00:00 2001 From: SoraKumo Date: Wed, 30 Oct 2024 15:57:36 +0900 Subject: [PATCH] Fixed to work with cloudflare's nodejs_compat_v2 --- packages/pg/lib/crypto/utils-webcrypto.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pg/lib/crypto/utils-webcrypto.js b/packages/pg/lib/crypto/utils-webcrypto.js index 0433f010c..90b3b9a18 100644 --- a/packages/pg/lib/crypto/utils-webcrypto.js +++ b/packages/pg/lib/crypto/utils-webcrypto.js @@ -13,7 +13,7 @@ module.exports = { * The Web Crypto API - grabbed from the Node.js library or the global * @type Crypto */ -const webCrypto = nodeCrypto.webcrypto || globalThis.crypto +const webCrypto = globalThis.crypto ?? nodeCrypto.webcrypto /** * The SubtleCrypto API for low level crypto operations. * @type SubtleCrypto