···6969 }
7070}
71717272-// Function to check for a DID in the well-known (not .well-known) location
7272+// Function to check for a DID in the well-known location
7373async function checkForDIDHTTPS(domain) {
7474 try {
7575 const response = await fetch(`https://${domain}/.well-known/atproto-did`)
···7878 throw new Error("Invalid Content-Type")
7979 }
8080 const data = await response.text()
8181- return data.did && isValidDID(data) ? data : null
8181+ return data && isValidDID(data) ? data : null
8282 } catch (error) {
8383 return null
8484 }