Supress change event on avatarUrl initialization

This commit is contained in:
lilia 2015-06-09 12:03:28 -07:00
parent ac401c78b3
commit 9795b26bc1

View file

@ -222,7 +222,7 @@
}
},
updateAvatarUrl: function() {
updateAvatarUrl: function(silent) {
this.revokeAvatarUrl();
var avatar = this.get('avatar');
if (avatar) {
@ -232,12 +232,14 @@
} else {
this.avatarUrl = null;
}
this.trigger('change');
if (!silent) {
this.trigger('change');
}
},
getAvatarUrl: function() {
if (this.avatarUrl === undefined) {
this.updateAvatarUrl();
this.updateAvatarUrl(true);
}
return this.avatarUrl || '/images/default.png';
},