Kaori Tokashiki 5 лет назад
Родитель
Сommit
bed442df52
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      src/server/service/bolt.js

+ 5 - 3
src/server/service/bolt.js

@@ -174,9 +174,13 @@ class BoltService {
       throw new Error('/growi command:search: Invalid keyword');
     }
 
-    // remove leading 'search'.
+    // removing 'search' from the head in the array.
     const shiftedValue = args.shift();
     const keywords = args.join(' ');
+
+    // adding 'search' to the head in the array again.
+    args.unshift(shiftedValue);
+
     const { searchService } = this.crowi;
     const ApiPaginate = require('../util/apiPaginate');
 
@@ -219,8 +223,6 @@ class BoltService {
       return data._source.path;
     });
 
-    args.unshift(shiftedValue);
-
     return {
       resultPaths, offset, keywords,
     };