Bug Fix - Profile Editing

This commit is contained in:
2024-04-07 23:31:18 -04:00
parent 0d4787ccfb
commit 5629dc8836
@@ -45,12 +45,11 @@ export function ProfileEdit({ profileData, user, onSave }) {
}
);
} else {
for (var key in data) {
if (data[key] == "") {
for (var key in profileData) {
if (data[key] == "" || (key == "pfp" && data[key].length == 0)) {
data[key] = profileData[key];
}
}
data.pfp = profileData.pfp;
handleEditState(false);
update(ref(database, `users/${user.uid}`), data);
}