sengi icon indicating copy to clipboard operation
sengi copied to clipboard

"undefined" being emitted when alt text / image description is empty, instead of omitting the image description

Open jerwarren opened this issue 2 years ago • 1 comments

When posting image with Sengi without providing alt text, the string "undefined" is set as alt text instead of omitting the alt text. Seems like it probably just needs to check if there is any alt text rather than just setting its value assuming it has some.

Here's an example: https://mastodon.cloud/@MichaelTheGeek/111723392900915243

I conducted a test with that user after noticing that all their images had "undefined" alt text, and determined it's Sengi causing it. (The same didn't happen when they posted with other clients.)

jerwarren avatar Jan 10 '24 21:01 jerwarren

Pretty sure this function here to blame, needing to check for the existence of attachment.description before trying to use it:

image

in media-viewer.component.ts

jerwarren avatar Jan 10 '24 22:01 jerwarren

will be available next release!

NicolasConstant avatar Mar 07 '24 23:03 NicolasConstant