!5 修改build报错

Merge pull request !5 from sophie/dev
This commit is contained in:
sophie authored and Gitee committed 2026-04-28 10:54:27 +00:00
commit aa01e6a5f0
1 file changed
+1 -1
+1 -1
View File
@@ -58,7 +58,7 @@ const officeObjectUrl = ref<string>('');
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) : '';
};