修改build报错

This commit is contained in:
sophie committed 2026-04-28 18:53:54 +08:00
1 parent 0875623605
commit dc805b250f
1 file changed
+1 -1
+1 -1
View File
@@ -58,7 +58,7 @@ const officeObjectUrl = ref<string>('');
const getExt = (raw: string) => { const getExt = (raw: string) => {
const clean = (raw.split('?')[0] ?? '').toLowerCase(); const clean = (raw.split('?')[0] ?? '').toLowerCase();
const parts = clean.split('/'); const parts = clean.split('/');
const lastPart = parts[parts.length - 1]; const lastPart = parts[parts.length - 1] ?? '';
const i = lastPart.lastIndexOf('.'); const i = lastPart.lastIndexOf('.');
return i >= 0 ? lastPart.slice(i + 1) : ''; return i >= 0 ? lastPart.slice(i + 1) : '';
}; };