Slight refactor

This commit is contained in:
Gregory Schier
2024-05-14 08:44:15 -07:00
parent 59a442e8c0
commit a22fc68764

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