Commit 937eb628 authored by XieZhiXiong's avatar XieZhiXiong

无图片地址不展示图片

parent b3e2177f
......@@ -7,11 +7,12 @@ interface PicWrapProps {
const PicWrap: React.FC<PicWrapProps> = ({ pics = [] }) => (
<ul className={styles.list}>
{pics.map((item, index) => (
<li key={index} className={styles['list-item']}>
<img src={item} />
</li>
))}
{pics.map((item, index) =>
item ? (
<li key={index} className={styles['list-item']}>
<img src={item} />
</li>
) : null)}
</ul>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment