Slight refactor

This commit is contained in:
Gregory Schier
2024-05-14 08:44:15 -07:00
parent c9e69b4b35
commit 1f88b7a41a

View File

@@ -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] ?? '';
};