fix: unable to delete profile picture

This commit is contained in:
or-else
2019-08-01 09:53:41 +03:00
parent 40edad1c99
commit bdf152e5d6
5 changed files with 29 additions and 25 deletions
+3 -2
View File
@@ -1,8 +1,9 @@
// Edit account parameters.
import React from 'react';
import { FormattedMessage } from 'react-intl';
import Tinode from 'tinode-sdk';
import AvatarUpload from '../widgets/avatar-upload.jsx';
import CheckBox from '../widgets/checkbox.jsx';
import InPlaceEdit from '../widgets/in-place-edit.jsx';
@@ -80,7 +81,7 @@ export default class EditAccountView extends React.Component {
handleImageChanged(img) {
this.setState({avatar: img});
this.props.onUpdateAccount(undefined, vcard(null, img));
this.props.onUpdateAccount(undefined, vcard(null, img || Tinode.DEL_CHAR));
}
handleCheckboxClick(what, checked) {