Here is all of the code. Maybe someone will see something that could help …
import wixData from "wix-data";
$w.onReady(function () {
});
export function emailCheck_click(event) {
let toverifyEmail = $w("#emailtoVerify").value;
let verificationEmail = (toverifyEmail).toLowerCase();
wixData.query("regClients")
.eq("registerEmail", (verificationEmail))
.find()
.then((results) => {
if(results.items.length > 0) {
$w("#verifyError").expand();
}
else {
$w("#registerForm").expand();
}
})
.catch( (err) => {
let errorMsg = err;
});
}