Explorar el Código

add slash to pagePath for searching

Yuki Takei hace 9 años
padre
commit
3dfa2ace85
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      packages/growi-plugin-lsx/src/resource/js/components/Lsx.jsx

+ 3 - 1
packages/growi-plugin-lsx/src/resource/js/components/Lsx.jsx

@@ -36,7 +36,9 @@ export class Lsx extends React.Component {
       return;   // go to render()
     }
 
-    let pagePath = lsxContext.pagePath;
+    // add slash ensure not to forward match to another page
+    // ex: '/Java/' not to match to '/JavaScript'
+    let pagePath = this.addSlashOfEnd(lsxContext.pagePath);
 
     this.props.crowi.apiGet('/plugins/lsx', {pagePath, queryOptions: lsxContext.options})
       .catch(error => {