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) : ''; };