mirror of
https://github.com/keven1024/015.git
synced 2026-05-26 07:08:02 +00:00
fix(front): handle potential undefined values in file sharing logic to prevent runtime errors
This commit is contained in:
@@ -80,7 +80,7 @@ const createFileShare = async (data: {
|
||||
const { files, config } = data || {}
|
||||
return await Promise.all(
|
||||
times(files.length, async (i) => {
|
||||
const { id, name } = files[i]
|
||||
const { id, name } = files[i] || {}
|
||||
return await createShare({
|
||||
type: 'file',
|
||||
data: id,
|
||||
|
||||
Reference in New Issue
Block a user