From c236cfdff93d4605b0ff02c7f4f5d8ed16f9e956 Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 16 Mar 2019 18:47:00 -0400 Subject: [PATCH] fix: aws cloudsearch empty fields query --- server/modules/search/aws/engine.js | 4 ++-- server/modules/storage/git/storage.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/modules/search/aws/engine.js b/server/modules/search/aws/engine.js index 072a69c5..916cc572 100644 --- a/server/modules/search/aws/engine.js +++ b/server/modules/search/aws/engine.js @@ -167,8 +167,8 @@ module.exports = { id: r.id, path: _.head(r.fields.path), locale: _.head(r.fields.locale), - title: _.head(r.fields.title), - description: _.head(r.fields.description) + title: _.head(r.fields.title) || '', + description: _.head(r.fields.description) || '' })), suggestions: suggestions, totalHits: results.hits.found diff --git a/server/modules/storage/git/storage.js b/server/modules/storage/git/storage.js index b49b838a..dbb5fdcd 100644 --- a/server/modules/storage/git/storage.js +++ b/server/modules/storage/git/storage.js @@ -145,7 +145,7 @@ module.exports = { if (_.includes(['sync', 'pull'], this.mode)) { const latestCommitLog = _.get(await this.git.log(['-n', '1', this.config.branch]), 'latest', {}) - const diff = await this.git.diffSummary([currentCommitLog.hash, latestCommitLog.hash]) + const diff = await this.git.diffSummary(['-M', currentCommitLog.hash, latestCommitLog.hash]) if (_.get(diff, 'files', []).length > 0) { for(const item of diff.files) { const contentType = getContenType(item.file)