fix: prevent avatar digest error on localhost

This commit is contained in:
Ben Allfree 2025-01-10 04:00:39 -08:00
parent 1ef47713f4
commit a1d7f65aa6

View File

@ -13,7 +13,7 @@
const msgBuffer = new TextEncoder().encode(normalizedEmail)
// Hash the email using MD5
const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer)
const hashBuffer = await crypto.subtle?.digest('SHA-256', msgBuffer)
// Convert the hash to a hex stringc
const hashArray = Array.from(new Uint8Array(hashBuffer))