mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-21 08:58:47 +08:00
fix: check if fields are not empty before sending request to the server
Closes #4643
This commit is contained in:
parent
13aaf3a994
commit
fe40988d6a
1 changed files with 6 additions and 1 deletions
|
|
@ -433,7 +433,12 @@ list["updateName"] = new SimplePopup(
|
|||
try {
|
||||
const user = Auth?.currentUser;
|
||||
const snapshot = DB.getSnapshot();
|
||||
if (!user || !snapshot) return;
|
||||
if (!user || !snapshot) return true;
|
||||
|
||||
if (!pass || !newName) {
|
||||
Notifications.add("Please fill in all fields", 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (user.providerData.find((p) => p?.providerId === "password")) {
|
||||
const credential = EmailAuthProvider.credential(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue