about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-09-21 23:20:06 +0200
committerThibaut Girka <thib@sitedethib.com>2018-09-21 23:20:06 +0200
commitd3426ed87ab3be29dece3f8d2c22bece9dda32dc (patch)
tree1aac7e6c41b6d19d962838034a220b78f8f9622c
parent23e7c1c765f5e500d369fcef9f020e4eb5b337d5 (diff)
Disable the “TOOT” button (and secondary toot button) if the toot text is empty
-rw-r--r--app/javascript/flavours/glitch/features/composer/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/features/composer/index.js b/app/javascript/flavours/glitch/features/composer/index.js
index ff01408e7..c1bd77844 100644
--- a/app/javascript/flavours/glitch/features/composer/index.js
+++ b/app/javascript/flavours/glitch/features/composer/index.js
@@ -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'>