yusuketk 5 лет назад
Родитель
Сommit
973ff4fae8
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/client/js/components/PageEditor/LinkEditModal.jsx

+ 2 - 2
src/client/js/components/PageEditor/LinkEditModal.jsx

@@ -72,8 +72,8 @@ class LinkEditModal extends React.PureComponent {
       type = Linker.types.markdownLink;
       type = Linker.types.markdownLink;
     }
     }
 
 
-    const url = new URL(link, 'http://example.com/dummy');
-    const isUseRelativePath = url.href === 'http://example.com/dummy' && !link.startsWith('/') && link !== '';
+    const url = new URL(link, 'http://example.com');
+    const isUseRelativePath = url.origin === 'http://example.com' && !link.startsWith('/') && link !== '';
     if (isUseRelativePath) {
     if (isUseRelativePath) {
       const rootPath = this.getRootPath(type);
       const rootPath = this.getRootPath(type);
       link = path.resolve(rootPath, link);
       link = path.resolve(rootPath, link);