Explorar o código

change comments

Kaori Tokashiki %!s(int64=5) %!d(string=hai) anos
pai
achega
bed442df52
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  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');
       throw new Error('/growi command:search: Invalid keyword');
     }
     }
 
 
-    // remove leading 'search'.
+    // removing 'search' from the head in the array.
     const shiftedValue = args.shift();
     const shiftedValue = args.shift();
     const keywords = args.join(' ');
     const keywords = args.join(' ');
+
+    // adding 'search' to the head in the array again.
+    args.unshift(shiftedValue);
+
     const { searchService } = this.crowi;
     const { searchService } = this.crowi;
     const ApiPaginate = require('../util/apiPaginate');
     const ApiPaginate = require('../util/apiPaginate');
 
 
@@ -219,8 +223,6 @@ class BoltService {
       return data._source.path;
       return data._source.path;
     });
     });
 
 
-    args.unshift(shiftedValue);
-
     return {
     return {
       resultPaths, offset, keywords,
       resultPaths, offset, keywords,
     };
     };