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];