diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-03-17 19:34:22 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-03-18 10:51:29 +0300 |
commit | d65c3a77e2de66112c87fd7df16a0c061fb8b0ad (patch) | |
tree | e023ef6dc829e9a31e3e29420a79b52f29130b73 /settings | |
parent | 382b18e85e021afbe738f8b21086908acb534248 (diff) |
Update avatar on username change if avatar is set
* fixes #20455
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/personal.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index b0bfa8eb230..3b2316d0614 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -83,7 +83,10 @@ function changeDisplayName () { $('#oldDisplayName').val($('#displayName').val()); // update displayName on the top right expand button $('#expandDisplayName').text($('#displayName').val()); - updateAvatar(); + // update avatar if avatar is available + if(!$('#removeavatar').hasClass('hidden')) { + updateAvatar(); + } } else { $('#newdisplayname').val(data.data.displayName); |