Sfoglia il codice sorgente

fix the problem that isCreatablePage always returns false

Yuki Takei 1 anno fa
parent
commit
09b0bc3edd

+ 1 - 1
apps/app/src/components/ReactMarkdownComponents/NextLink.tsx

@@ -26,7 +26,7 @@ const isExternalLink = (href: string, siteUrl: string | undefined): boolean => {
 
 const isCreatablePage = (href: string) => {
   try {
-    const url = new URL(href);
+    const url = new URL(href, 'http://example.com');
     const pathName = url.pathname;
     return pagePathUtils.isCreatablePage(pathName);
   }