Better var name

This commit is contained in:
Lim Chee Aun 2023-03-15 00:55:32 +08:00
parent a838e30f4a
commit fcfe9738ef

View file

@ -701,10 +701,10 @@ function Compose({
if (mediaAttachments.length > 0) {
// If there are media attachments, check if they have no descriptions
const noDescription = mediaAttachments.some(
(media) => !media.description?.trim(),
const hasNoDescriptions = mediaAttachments.some(
(media) => !media.description?.trim?.(),
);
if (noDescription) {
if (hasNoDescriptions) {
const yes = confirm('Some media have no descriptions. Continue?');
if (!yes) return;
}