mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-28 17:05:49 +01:00
Disable the “TOOT” button (and secondary toot button) if the toot text is empty
This commit is contained in:
parent
23e7c1c765
commit
d3426ed87a
1 changed files with 2 additions and 2 deletions
|
@ -242,7 +242,7 @@ const handlers = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Submit disabled:
|
// Submit disabled:
|
||||||
if (isSubmitting || isUploading || (!!text.length && !text.trim().length && !anyMedia)) {
|
if (isSubmitting || isUploading || (!text.trim().length && !anyMedia)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,7 +415,7 @@ class Composer extends React.Component {
|
||||||
spoilersAlwaysOn,
|
spoilersAlwaysOn,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
let disabledButton = isSubmitting || isUploading || (!!text.length && !text.trim().length && !anyMedia);
|
let disabledButton = isSubmitting || isUploading || (!text.trim().length && !anyMedia);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='composer'>
|
<div className='composer'>
|
||||||
|
|
Loading…
Reference in a new issue