fix some compose form errors

This commit is contained in:
Tykayn 2022-03-29 10:40:41 +02:00 committed by tykayn
parent b8723f3fce
commit 7bac99c844

View File

@ -55,7 +55,6 @@ class ComposeForm extends ImmutablePureComponent {
onFetchSuggestions: PropTypes.func,
onSuggestionSelected: PropTypes.func,
onChangeSpoilerText: PropTypes.func,
onPaste: PropTypes.func,
onPickEmoji: PropTypes.func,
showSearch: PropTypes.bool,
anyMedia: PropTypes.bool,
@ -88,8 +87,7 @@ class ComposeForm extends ImmutablePureComponent {
return [
this.props.spoiler? this.props.spoilerText: '',
countableText(this.props.text),
this.props.advancedOptions && this.props.advancedOptions.get('do_not_federate') ? ' 👁️' : ''
].join('');
this.props.advancedOptions && this.props.advancedOptions.get('do_not_federate') ? ' 👁️' : ''].join('');
}
canSubmit = () => {
@ -173,7 +171,7 @@ class ComposeForm extends ImmutablePureComponent {
this.handleSubmit();
}
if (e.keyCode == 13 && e.altKey) {
if (e.keyCode === 13 && e.altKey) {
this.handleSecondarySubmit();
}
}