Handle maxMediaAttachments being undefined while creating the gif picker button

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

View file

@ -1410,7 +1410,7 @@ function Compose({
class="toolbar-button gif-picker-button" class="toolbar-button gif-picker-button"
disabled={ disabled={
uiState === 'loading' || uiState === 'loading' ||
mediaAttachments.length >= maxMediaAttachments || (maxMediaAttachments ? mediaAttachments.length >= maxMediaAttachments : true) ||
!!poll !!poll
} }
onClick={() => { onClick={() => {