Disable the “TOOT” button (and secondary toot button) if the toot text is empty

lolsob-rspec
Thibaut Girka 2018-09-21 23:20:06 +02:00
parent 840cf21a3c
commit 0081bf3784
1 changed files with 2 additions and 2 deletions

View File

@ -242,7 +242,7 @@ const handlers = {
}
// Submit disabled:
if (isSubmitting || isUploading || (!!text.length && !text.trim().length && !anyMedia)) {
if (isSubmitting || isUploading || (!text.trim().length && !anyMedia)) {
return;
}
@ -415,7 +415,7 @@ class Composer extends React.Component {
spoilersAlwaysOn,
} = this.props;
let disabledButton = isSubmitting || isUploading || (!!text.length && !text.trim().length && !anyMedia);
let disabledButton = isSubmitting || isUploading || (!text.trim().length && !anyMedia);
return (
<div className='composer'>