Shun Miyazawa 3 лет назад
Родитель
Сommit
d6affc55fe
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      packages/app/src/server/service/search-delegator/elasticsearch.ts

+ 4 - 4
packages/app/src/server/service/search-delegator/elasticsearch.ts

@@ -970,10 +970,10 @@ class ElasticsearchDelegator implements SearchDelegator<Data, ESTermsKey, ESQuer
       throw Error('Cannnot process search since terms is undefined.');
     }
 
-    const from = option.offset || null;
-    const size = option.limit || null;
-    const sort = option.sort || null;
-    const order = option.order || null;
+    const from = option?.offset ?? null;
+    const size = option?.limit ?? null;
+    const sort = option?.sort ?? null;
+    const order = option?.order ?? null;
     const query = this.createSearchQuery();
     this.appendCriteriaForQueryString(query, terms);