Fix auto display: none not working

`this` probably refers to something else
This commit is contained in:
Lim Chee Aun 2022-12-17 14:38:21 +08:00
parent f896225707
commit e6ed64cfd0

View file

@ -220,8 +220,10 @@ function Card({ card }) {
height={height}
loading="lazy"
alt=""
onError={() => {
this.style.display = 'none';
onError={(e) => {
try {
e.target.style.display = 'none';
} catch (e) {}
}}
/>
<div class="meta-container">