Hide author icon when loading returns an error (#644)

Fixes #643
pull/678/head
Cliff J 3 years ago committed by GitHub
parent 70a1755c50
commit e1726683f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -193,7 +193,7 @@
<div class="chatlog__embed-author">
@if (!string.IsNullOrWhiteSpace(embed.Author.IconUrl))
{
<img class="chatlog__embed-author-icon" src="@await ResolveUrlAsync(embed.Author.IconProxyUrl ?? embed.Author.IconUrl)" alt="Author icon" loading="lazy">
<img class="chatlog__embed-author-icon" src="@await ResolveUrlAsync(embed.Author.IconProxyUrl ?? embed.Author.IconUrl)" alt="Author icon" loading="lazy" onerror="this.style.visibility='hidden'">
}
@if (!string.IsNullOrWhiteSpace(embed.Author.Name))

Loading…
Cancel
Save