2
0
Эх сурвалжийг харах

Merge branch 'imprv/enhance-link-edit-feature-for-merge' into imprv/modify-design-of-link-edit-modal

yusuketk 5 жил өмнө
parent
commit
3369aa4410

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

@@ -171,7 +171,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;