mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 12:18:30 +03:00
Shorten expressions using the always-false property of undefined comparisons
This commit is contained in:
parent
61946a8e67
commit
3fa9796941
1 changed files with 3 additions and 3 deletions
|
@ -226,7 +226,7 @@ function Compose({
|
|||
const {
|
||||
statuses: {
|
||||
maxCharacters,
|
||||
maxMediaAttachments,
|
||||
maxMediaAttachments, // Beware: it can be undefined on *oma instances!
|
||||
charactersReservedPerUrl,
|
||||
} = {},
|
||||
mediaAttachments: {
|
||||
|
@ -1318,7 +1318,7 @@ function Compose({
|
|||
<input
|
||||
type="file"
|
||||
accept={supportedMimeTypes?.join(',')}
|
||||
multiple={maxMediaAttachments ? mediaAttachments.length < maxMediaAttachments - 1 : true}
|
||||
multiple={!(mediaAttachments.length > maxMediaAttachments)}
|
||||
disabled={
|
||||
uiState === 'loading' ||
|
||||
mediaAttachments.length >= maxMediaAttachments ||
|
||||
|
@ -1410,7 +1410,7 @@ function Compose({
|
|||
class="toolbar-button gif-picker-button"
|
||||
disabled={
|
||||
uiState === 'loading' ||
|
||||
(maxMediaAttachments ? mediaAttachments.length >= maxMediaAttachments : true) ||
|
||||
!(mediaAttachments.length < maxMediaAttachments) ||
|
||||
!!poll
|
||||
}
|
||||
onClick={() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue