Improve getExtension func
This commit is contained in:
parent
0434c79293
commit
5823f31e66
@ -275,7 +275,7 @@ const open = () => {
|
||||
const getExtension = (fileName: string): string => {
|
||||
const lastDotIndex = fileName.lastIndexOf('.');
|
||||
if (lastDotIndex === -1) {
|
||||
return '';
|
||||
return fileName;
|
||||
}
|
||||
return fileName.substring(lastDotIndex );
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user