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

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

@@ -169,7 +169,7 @@ class LinkEditModal extends React.PureComponent {
     let permalink = '';
 
     if (path.startsWith('/')) {
-      const pathWithoutFragment = path.split('#')[0];
+      const pathWithoutFragment = new URL(path, 'http://dummy').pathname;
       const isPermanentLink = validator.isMongoId(pathWithoutFragment.slice(1));
       const pageId = isPermanentLink ? pathWithoutFragment.slice(1) : null;