Reapply "Reapply "fix: backgroundUrls 从 const 改为 let,允许 SVG 赋值""

This reverts commit 4bc747201f.
This commit is contained in:
李进
2026-07-27 15:49:57 +08:00
parent 4bc747201f
commit 2ee4bb9f26
+1 -1
View File
@@ -944,7 +944,7 @@
const children = [];
const imageCandidates = getElementImageCandidates(element);
const currentSrc = imageCandidates[0] || null;
const backgroundUrls = extractStyleImageUrls(styles);
let backgroundUrls = extractStyleImageUrls(styles);
if (/^(IMG|VIDEO|SOURCE|PICTURE)$/i.test(element.tagName)) {
for (const url of imageCandidates) {