Skip to content

fix: 图片降级重试#3352

Merged
Alexzjt merged 2 commits into
nextfrom
fix/imageCors
Jun 10, 2026
Merged

fix: 图片降级重试#3352
Alexzjt merged 2 commits into
nextfrom
fix/imageCors

Conversation

@Alexzjt

@Alexzjt Alexzjt commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

👀 PR includes

修复在跨域条件下的图片获取失败

📝 Description

🖼️ Screenshot

Before After

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a referrerPolicy option to the asyncDrawImage utility, allowing image load retries to bypass certain anti-leech CDNs by using no-referrer. It also correctly reorders the assignment of crossOrigin and referrerPolicy to occur before setting the image src. The review feedback recommends using explicit null/undefined checks (!= null or !== null) instead of truthy checks for crossOrigin and referrerPolicy. This ensures that valid empty string values ("") are not incorrectly ignored as falsy.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/s2-core/src/utils/cell/customRenderer.ts
Comment thread packages/s2-core/src/utils/cell/customRenderer.ts
@github-actions

Copy link
Copy Markdown
Contributor

Size Change: +71 B (+0.01%)

Total Size: 745 kB

📦 View Changed
Filename Size Change
packages/s2-core/dist/s2-extends.min.js 209 kB +38 B (+0.02%)
packages/s2-core/dist/s2.min.css 583 B +2 B (+0.34%)
packages/s2-core/dist/s2.min.js 312 kB +31 B (+0.01%)
ℹ️ View Unchanged
Filename Size
packages/s2-react-components/dist/s2-react-components.min.css 2.55 kB
packages/s2-react-components/dist/s2-react-components.min.js 123 kB
packages/s2-react/dist/s2-react.min.css 1.3 kB
packages/s2-react/dist/s2-react.min.js 38.5 kB
packages/s2-vue/dist/s2-vue.min.css 3.8 kB
packages/s2-vue/dist/s2-vue.min.js 54.2 kB

compressed-size-action

@Alexzjt Alexzjt merged commit 13de5d0 into next Jun 10, 2026
12 of 13 checks passed
@Alexzjt Alexzjt deleted the fix/imageCors branch June 10, 2026 10:03
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version @antv/s2-v2.7.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant