@@ -107,8 +107,10 @@ onMounted(() => {
107107 src: media .url ,
108108 w: media .properties .width ,
109109 h: media .properties .height ,
110- alt: media .comment ?? media .name ,
111- comment: media .comment ?? media .name ,
110+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
111+ alt: media .comment || media .name ,
112+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
113+ comment: media .comment || media .name ,
112114 };
113115 if (media .properties .orientation != null && media .properties .orientation >= 5 ) {
114116 [item .w , item .h ] = [item .h , item .w ];
@@ -155,8 +157,10 @@ onMounted(() => {
155157 [itemData .w , itemData .h ] = [itemData .h , itemData .w ];
156158 }
157159 itemData .msrc = file .thumbnailUrl ?? undefined ;
158- itemData .alt = file .comment ?? file .name ;
159- itemData .comment = file .comment ?? file .name ;
160+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
161+ itemData .alt = file .comment || file .name ;
162+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
163+ itemData .comment = file .comment || file .name ;
160164 itemData .thumbCropped = true ;
161165
162166 return itemData ;
0 commit comments