Don't create a group without a name
This commit is contained in:
parent
d5c85dfbd8
commit
2de682ef7b
1 changed files with 6 additions and 1 deletions
|
@ -196,10 +196,15 @@ var Whisper = Whisper || {};
|
|||
},
|
||||
|
||||
createGroup: function() {
|
||||
var name = this.$el.find('.new-group-update-form .name').val();
|
||||
if (!name.trim().length) {
|
||||
return;
|
||||
}
|
||||
|
||||
return this.avatarInput.getFiles().then(function(avatarFiles) {
|
||||
var attributes = {
|
||||
type: 'group',
|
||||
name: this.$el.find('.new-group-update-form .name').val(),
|
||||
name: name,
|
||||
avatar: avatarFiles[0],
|
||||
members: this.recipients.pluck('id')
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue