From dc805b250fa2b4375162e3eb1af509714dafd1a7 Mon Sep 17 00:00:00 2001 From: sophie <16087569+sophie_liang@user.noreply.gitee.com> Date: Tue, 28 Apr 2026 18:53:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9build=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/FilePreviewModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/FilePreviewModal.vue b/frontend/src/components/FilePreviewModal.vue index 309a1c99..3127b42d 100644 --- a/frontend/src/components/FilePreviewModal.vue +++ b/frontend/src/components/FilePreviewModal.vue @@ -58,7 +58,7 @@ const officeObjectUrl = ref(''); const getExt = (raw: string) => { const clean = (raw.split('?')[0] ?? '').toLowerCase(); const parts = clean.split('/'); - const lastPart = parts[parts.length - 1]; + const lastPart = parts[parts.length - 1] ?? ''; const i = lastPart.lastIndexOf('.'); return i >= 0 ? lastPart.slice(i + 1) : ''; };