Browse Source

reset unnecessary change

yusuketk 5 years ago
parent
commit
8748999e34
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/client/js/components/PageEditor/LinkEditModal.jsx

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

@@ -35,10 +35,10 @@ class LinkEditModal extends React.PureComponent {
       labelInputValue: '',
       labelInputValue: '',
       linkerType: Linker.types.markdownLink,
       linkerType: Linker.types.markdownLink,
       markdown: '',
       markdown: '',
+      previewError: '',
       permalink: '',
       permalink: '',
       linkText: '',
       linkText: '',
       isPreviewOpen: false,
       isPreviewOpen: false,
-      previewError: '',
     };
     };
 
 
     this.isApplyPukiwikiLikeLinkerPlugin = window.growiRenderer.preProcessors.some(process => process.constructor.name === 'PukiwikiLikeLinker');
     this.isApplyPukiwikiLikeLinkerPlugin = window.growiRenderer.preProcessors.some(process => process.constructor.name === 'PukiwikiLikeLinker');
@@ -150,8 +150,8 @@ class LinkEditModal extends React.PureComponent {
   async setMarkdown() {
   async setMarkdown() {
     const path = this.state.linkInputValue;
     const path = this.state.linkInputValue;
     let markdown = '';
     let markdown = '';
-    let permalink = '';
     let previewError = '';
     let previewError = '';
+    let permalink = '';
 
 
     if (path.startsWith('/')) {
     if (path.startsWith('/')) {
       const pathWithoutFragment = new URL(path, 'http://dummy').pathname;
       const pathWithoutFragment = new URL(path, 'http://dummy').pathname;
@@ -171,7 +171,7 @@ class LinkEditModal extends React.PureComponent {
     else {
     else {
       previewError = `'${path}' is not a GROWI page.`;
       previewError = `'${path}' is not a GROWI page.`;
     }
     }
-    this.setState({ permalink, markdown, previewError });
+    this.setState({ markdown, previewError, permalink });
   }
   }
 
 
   renderLinkPreview() {
   renderLinkPreview() {