fix(front): handle potential undefined values in file sharing logic to prevent runtime errors

This commit is contained in:
keven1024
2025-10-13 22:03:03 +08:00
parent e959a0bc3e
commit 083005dac3

View File

@@ -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,