mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Merge 70a1f3701a
into a50c8e951f
This commit is contained in:
commit
9a4059a1cd
1 changed files with 2 additions and 2 deletions
|
@ -101,9 +101,9 @@ class ComposeForm extends ImmutablePureComponent {
|
|||
canSubmit = () => {
|
||||
const { isSubmitting, isChangingUpload, isUploading, anyMedia, maxChars } = this.props;
|
||||
const fulltext = this.getFulltextForCharacterCounting();
|
||||
const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
|
||||
const hasNoTextContent = fulltext.trim().length === 0;
|
||||
|
||||
return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > maxChars || (isOnlyWhitespace && !anyMedia));
|
||||
return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > maxChars || (hasNoTextContent && !anyMedia));
|
||||
};
|
||||
|
||||
handleSubmit = (e) => {
|
||||
|
|
Loading…
Reference in a new issue