瀏覽代碼

add slash to pagePath for searching

Yuki Takei 9 年之前
父節點
當前提交
3dfa2ace85
共有 1 個文件被更改,包括 3 次插入1 次删除
  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 => {