From ae52fe68ffdbd6e45545d7f538e0e847d23343a4 Mon Sep 17 00:00:00 2001 From: Damian Cyntler Date: Sun, 16 Oct 2022 10:24:49 +0200 Subject: [PATCH] Fix DocumentNav --- src/components/DocumentNav.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/DocumentNav.tsx b/src/components/DocumentNav.tsx index 1cf0338d..07c4fbbb 100644 --- a/src/components/DocumentNav.tsx +++ b/src/components/DocumentNav.tsx @@ -16,8 +16,7 @@ export const DocumentNav: FC<{}> = () => { if (documents.length <= 1 || !currentDocument) return null; - let fileName = currentDocument.uri; - + let fileName = currentDocument.uri || ""; const splitURL = fileName.split("/"); if (splitURL.length) { fileName = splitURL[splitURL.length - 1];