Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

fix: Optimize external resource image blocking

shuai354c8e536158
diff --git a/ui/src/pages/Layout/index.tsx b/ui/src/pages/Layout/index.tsx
index e61d5afd..3ed8a8ac 100644
--- a/ui/src/pages/Layout/index.tsx
+++ b/ui/src/pages/Layout/index.tsx
@@ -86,7 +86,7 @@ const Layout: FC = () => {
) as NodeListOf<HTMLImageElement>;
images.forEach((img) => {
- // 标记为已处理,避免重复处理
+ // Mark as processed to avoid duplication
img.setAttribute('data-processed', 'true');
if (
@@ -122,7 +122,6 @@ const Layout: FC = () => {
});
}
});
- // 如果发现新图片,处理它们
if (hasNewImages) {
replaceImgSrc();
}