Make "multiple" condition more readable

This commit is contained in:
Stefano Pigozzi 2024-09-10 16:53:04 +02:00
parent 1abbe33b76
commit f82e721c80
No known key found for this signature in database
GPG key ID: 5ADA3868646C3FC0

View file

@ -1316,7 +1316,7 @@ function Compose({
<input
type="file"
accept={supportedMimeTypes?.join(',')}
multiple={!(maxMediaAttachments - mediaAttachments.length < 2)}
multiple={(maxMediaAttachments === undefined) || (maxMediaAttachments - mediaAttachments >= 2)}
disabled={
uiState === 'loading' ||
mediaAttachments.length >= maxMediaAttachments ||