1 file changed
+1
-1
@@ -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) : '';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user