summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2014-10-07 15:00:31 +0200
committerMorris Jobke <hey@morrisjobke.de>2014-10-07 15:00:31 +0200
commit432cd4a5c2b1c6f3a5c0ea7205ed5a01ee0381d7 (patch)
tree9b6eadf2bed22f9e812cb17113174912a3717ae3 /settings
parent814bce4cac0afb699517b3b643e0dc7694f073b1 (diff)
parent0039099f5119224d9bfed5ee1d5659ed3df5f46c (diff)
downloadnextcloud-server-432cd4a5c2b1c6f3a5c0ea7205ed5a01ee0381d7.tar.gz
nextcloud-server-432cd4a5c2b1c6f3a5c0ea7205ed5a01ee0381d7.zip
Merge pull request #11428 from michag86/patch-1
fix for issue #10483
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users/users.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index f39f8c2c064..0cb5fe3e15c 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -616,13 +616,16 @@ $(document).ready(function () {
.keypress(function (event) {
if (event.keyCode === 13) {
if ($(this).val().length > 0) {
- $tr.find('.avatardiv').imageplaceholder(uid, displayName);
+ var $div = $tr.find('div.avatardiv');
+ if ($div.length) {
+ $div.imageplaceholder(uid, displayName);
+ }
$.post(
OC.filePath('settings', 'ajax', 'changedisplayname.php'),
{username: uid, displayName: $(this).val()},
function (result) {
- if (result && result.status==='success'){
- $tr.find('.avatardiv').avatar(result.data.username, 32);
+ if (result && result.status==='success' && $div.length){
+ $div.avatar(result.data.username, 32);
}
}
);