修复一些附件文件名无后缀导致报错
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
const fileUtils = {
|
const fileUtils = {
|
||||||
getExtFileName(filename) {
|
getExtFileName(filename) {
|
||||||
const index = filename.lastIndexOf('.');
|
try {
|
||||||
return index !== -1 ? filename.slice(index) : '';
|
const index = filename.lastIndexOf('.');
|
||||||
|
return index !== -1 ? filename.slice(index) : '';
|
||||||
|
} catch (e) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async getBuffHash(buff) {
|
async getBuffHash(buff) {
|
||||||
|
|||||||
Reference in New Issue
Block a user