Updated submitCompose to take in groupId intead of group
• Updated: - submitCompose to take in groupId intead of group
This commit is contained in:
@@ -141,14 +141,15 @@ class ComposeForm extends ImmutablePureComponent {
|
||||
// }
|
||||
|
||||
// Submit disabled:
|
||||
const { isSubmitting, isChangingUpload, isUploading, anyMedia } = this.props;
|
||||
const { isSubmitting, isChangingUpload, isUploading, anyMedia, group } = this.props;
|
||||
const fulltext = [this.props.spoilerText, countableText(this.props.text)].join('');
|
||||
|
||||
if (isSubmitting || isUploading || isChangingUpload || length(fulltext) > MAX_POST_CHARACTER_COUNT || (fulltext.length !== 0 && fulltext.trim().length === 0 && !anyMedia)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.props.onSubmit(this.props.group, this.props.replyToId, this.context.router);
|
||||
const groupId = group ? group.get('id') : undefined
|
||||
this.props.onSubmit(groupId, this.props.replyToId, this.context.router);
|
||||
}
|
||||
|
||||
onSuggestionsClearRequested = () => {
|
||||
|
||||
Reference in New Issue
Block a user