From 083005dac35e497c8cde353bd9342ebdf3ef763d Mon Sep 17 00:00:00 2001 From: keven1024 Date: Mon, 13 Oct 2025 22:03:03 +0800 Subject: [PATCH] fix(front): handle potential undefined values in file sharing logic to prevent runtime errors --- front/composables/useMyAppShare.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/composables/useMyAppShare.ts b/front/composables/useMyAppShare.ts index 3f0a5ce..76ceed4 100644 --- a/front/composables/useMyAppShare.ts +++ b/front/composables/useMyAppShare.ts @@ -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,