mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
修复可能的报错, 当数据格式不是字符串时
This commit is contained in:
parent
7cd4b0c8a5
commit
44f46bcfb3
@ -340,7 +340,7 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
||||
files = (Array.isArray(value)
|
||||
? value
|
||||
: joinValues
|
||||
? (((value as any).value || value) as string).split(delimiter)
|
||||
? `${(value as any).value || value}`.split(delimiter)
|
||||
: [((value as any).value || value) as string]
|
||||
)
|
||||
.map(item => FileControl.valueToFile(item, props) as FileValue)
|
||||
@ -883,16 +883,18 @@ export default class FileControl extends React.Component<FileProps, FileState> {
|
||||
total: tasks.length
|
||||
};
|
||||
|
||||
mapLimit(tasks, 3, uploadPartFile(state, config), function (
|
||||
err: any,
|
||||
results: any
|
||||
) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
finishChunk(results, state);
|
||||
mapLimit(
|
||||
tasks,
|
||||
3,
|
||||
uploadPartFile(state, config),
|
||||
function (err: any, results: any) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
finishChunk(results, state);
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
}
|
||||
|
||||
function updateProgress(partNumber: number, progress: number) {
|
||||
|
Loading…
Reference in New Issue
Block a user