mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-15 15:21:31 +03:00
Trim spurious whitespace of nicknames
This commit is contained in:
parent
d5e9d5306a
commit
7d22bbc00f
1 changed files with 4 additions and 2 deletions
|
@ -77,10 +77,12 @@ export default class ProfileSettings extends React.Component {
|
|||
const client = MatrixClientPeg.get();
|
||||
const newState = {};
|
||||
|
||||
const displayName = this.state.displayName.trim();
|
||||
try {
|
||||
if (this.state.originalDisplayName !== this.state.displayName) {
|
||||
await client.setDisplayName(this.state.displayName);
|
||||
newState.originalDisplayName = this.state.displayName;
|
||||
await client.setDisplayName(displayName);
|
||||
newState.originalDisplayName = displayName;
|
||||
newState.displayName = displayName;
|
||||
}
|
||||
|
||||
if (this.state.avatarFile) {
|
||||
|
|
Loading…
Reference in a new issue