stream post empty
This commit is contained in:
@@ -550,7 +550,7 @@ define('views/stream/panel', ['views/record/panels/relationship', 'lib!Textcompl
|
||||
return;
|
||||
}
|
||||
|
||||
if (message === '' && (this.seed.get('attachmentsIds') || []).length === 0) {
|
||||
if (message.trim() === '' && (this.seed.get('attachmentsIds') || []).length === 0) {
|
||||
this.notify('Post cannot be empty', 'error');
|
||||
this.$textarea.prop('disabled', false);
|
||||
this.controlPostButtonAvailability();
|
||||
|
||||
@@ -255,7 +255,9 @@ define('views/stream/record/edit', ['views/record/base'], function (Dep) {
|
||||
validate: function () {
|
||||
var notValid = Dep.prototype.validate.call(this);
|
||||
|
||||
if (this.model.get('post') === '' && !(this.model.get('attachmentsIds') || []).length) {
|
||||
let message = this.model.get('post') || '';
|
||||
|
||||
if (message.trim() === '' && !(this.model.get('attachmentsIds') || []).length) {
|
||||
notValid = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user