setUserData - not saving

hey guys im working on setting userdata for the userprofile on our dapp. this is the code
this is the code. it briefly updates the user interface in regadr to username but then switches back to the original username. in the database its never being updated.

const handleSubmit = async (e) => {
    e.preventDefault();

    const username = document.getElementById("username").value;
    const email = document.getElementById("email").value;
    const socials = document.getElementById("socials").value;
 

    await setUserData({
      username,
      email,
      url: socials,
      // file: avatar,
    });
  };

inputs are inside a form which triggers the "handleSubmit"function onSubmit.
the input fields have id & name value according to the .getElementById values… it worked yesterday for some time but now its buggin

Let me know if you have an idea what it could be… :slight_smile: thx

ps. theres no errors thrown in console log. all dependencies are installed and imported correctly

ps i tried doing it with async & awit setUserData, as well as without async & await.

can you add some console.log lines to make sure that the function is called and that it reads the expected data?

just checked. function is always executed. So what it seems to be is that as theres an input field for an email, if its not a valid email format it doesnt take any of the values in. probably gonna change the input type from email to text to avoid this…
as always thanks @cryptokid for your attention