feat: Adds email signature form to profile settings (#3906)

This commit is contained in:
Nithin David Thomas 2022-02-15 10:38:24 +05:30 committed by GitHub
parent d5c9193d1a
commit 351a3dc372
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 254 additions and 7 deletions

View file

@ -142,9 +142,9 @@ export default {
}) {
const formData = new FormData();
Object.keys(profileAttributes).forEach(key => {
const value = profileAttributes[key];
if (value) {
formData.append(`profile[${key}]`, value);
const hasValue = profileAttributes[key] === undefined;
if (!hasValue) {
formData.append(`profile[${key}]`, profileAttributes[key]);
}
});
formData.append('profile[display_name]', displayName || '');