Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Not try to modify lock file #29944

Merged
merged 1 commit into from Mar 30, 2021
Merged

fix: Not try to modify lock file #29944

merged 1 commit into from Mar 30, 2021

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Mar 29, 2021

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

resolve #29233

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Upload not crash when passed fileList is frozen object.
🇨🇳 Chinese 修复 Upload 在 fileList 为冻结对象时不再崩溃。

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

github-actions bot commented Mar 29, 2021

@github-actions
Copy link
Contributor

Size Change: +37 B (0%)

Total Size: 828 kB

Filename Size Change
./dist/antd-with-locales.min.js 338 kB +7 B (0%)
./dist/antd.min.js 297 kB +30 B (0%)
ℹ️ View Unchanged
Filename Size Change
./dist/antd.compact.min.css 63.7 kB 0 B
./dist/antd.dark.min.css 65 kB 0 B
./dist/antd.min.css 63.7 kB 0 B

compressed-size-action

@codecov
Copy link

codecov bot commented Mar 29, 2021

Codecov Report

Merging #29944 (73c758a) into master (a1baecb) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master    #29944   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          397       397           
  Lines         7518      7518           
  Branches      2099      2099           
=========================================
  Hits          7518      7518           
Impacted Files Coverage Δ
components/upload/Upload.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1baecb...73c758a. Read the comment docs.

@zombieJ zombieJ merged commit 8e885a7 into master Mar 30, 2021
@zombieJ zombieJ deleted the no-lock branch March 30, 2021 03:59
@@ -77,7 +77,7 @@ const InternalUpload: React.ForwardRefRenderFunction<unknown, UploadProps> = (pr
const timestamp = Date.now();

(fileList || []).forEach((file, index) => {
if (!file.uid) {
if (!file.uid && !Object.isFrozen(file)) {
file.uid = `__AUTO__${timestamp}_${index}__`;
Copy link
Contributor

@yoyo837 yoyo837 Mar 30, 2021

Choose a reason for hiding this comment

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

是不是加个warning好一些?提示尝试初始化uid失败,因为啥啥啥的。

gepd pushed a commit to gepd/ant-design that referenced this pull request Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants