mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-19 07:54:23 +01:00
Slight refactor
This commit is contained in:
@@ -496,7 +496,7 @@ const newPairContainer = (initialPair?: Pair): PairContainer => {
|
||||
};
|
||||
|
||||
const getFileName = (path: string | null | undefined): string => {
|
||||
console.log('PATH', path);
|
||||
const parts = String(path).split(/[\\/]/);
|
||||
if (typeof path !== 'string') return '';
|
||||
const parts = path.split(/[\\/]/);
|
||||
return parts[parts.length - 1] ?? '';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user