-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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(components): [upload] fix empty array error #13490
Conversation
👋 @youpinyao, seems like this is your first time contribution to element-plus.
|
Hello @youpinyao, thank you for contributing to element-plus, please see our guideline to see how to make contribution |
@youpinyao Thank you for your contribution. If it is convenient, please modify the title according to the specification. |
@chenxch This pr has not responded for too long, maybe we can modify it directly and then merge it? 🤔 |
在 components/upload/src/ajax.ts 73 行中,如果data 中key对应的value 是空数组的情况下`if (Array.isArray(value)) formData.append(key, ...value)`报错
🧪 Playground Preview: https://element-plus.run/?pr=13490 |
* fix(components): [upload] fix empty array error 在 components/upload/src/ajax.ts 73 行中,如果data 中key对应的value 是空数组的情况下`if (Array.isArray(value)) formData.append(key, ...value)`报错 * fix: reuse isArray --------- Co-authored-by: btea <2356281422@qq.com>
* fix(components): [upload] fix empty array error 在 components/upload/src/ajax.ts 73 行中,如果data 中key对应的value 是空数组的情况下`if (Array.isArray(value)) formData.append(key, ...value)`报错 * fix: reuse isArray --------- Co-authored-by: btea <2356281422@qq.com>
在 components/upload/src/ajax.ts 73 行中,如果data 中key对应的value 是空数组的情况下
if (Array.isArray(value)) formData.append(key, ...value)
报错Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.Description
🤖 Generated by Copilot at a69c768
Fix a bug in
ajaxUpload
that caused an error with empty array values inoption.data
. Add a test case for this scenario inajax.ts
.Related Issue
Fixes #___.
Explanation of Changes
🤖 Generated by Copilot at a69c768