Handle maxMediaAttachments being undefined while creating the file input button

This commit is contained in:
Stefano Pigozzi 2024-09-05 10:58:24 +02:00
parent f7d783314e
commit 143b38979b
No known key found for this signature in database
GPG key ID: 5ADA3868646C3FC0

View file

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