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