Skip to content

Commit 65a2e71

Browse files
committed
if no link return null
1 parent e97949c commit 65a2e71

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/fs/src/hyperbook.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ export const getNavigationForFile = async (
8585
i = filteredPageList.findIndex((p) => p.href === currentFile.path.href);
8686

8787
const resolveLink = (link: string): HyperbookPage | null => {
88+
if (!link) {
89+
return null;
90+
}
8891
if (link.startsWith("/@/")) {
8992
return (
9093
allPages.find((p) => p.permaid === link.split("/@/")[1].trim()) ||

0 commit comments

Comments
 (0)