From 1f88b7a41af20f8cad8a750342bcebaaf12ee2a6 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Tue, 14 May 2024 08:44:15 -0700 Subject: [PATCH] Slight refactor --- src-web/components/core/PairEditor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src-web/components/core/PairEditor.tsx b/src-web/components/core/PairEditor.tsx index fed58b91..db0b116e 100644 --- a/src-web/components/core/PairEditor.tsx +++ b/src-web/components/core/PairEditor.tsx @@ -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] ?? ''; };