Commit c236cfdf authored by Nick's avatar Nick

fix: aws cloudsearch empty fields query

parent 6eb6eecf
...@@ -167,8 +167,8 @@ module.exports = { ...@@ -167,8 +167,8 @@ module.exports = {
id: r.id, id: r.id,
path: _.head(r.fields.path), path: _.head(r.fields.path),
locale: _.head(r.fields.locale), locale: _.head(r.fields.locale),
title: _.head(r.fields.title), title: _.head(r.fields.title) || '',
description: _.head(r.fields.description) description: _.head(r.fields.description) || ''
})), })),
suggestions: suggestions, suggestions: suggestions,
totalHits: results.hits.found totalHits: results.hits.found
......
...@@ -145,7 +145,7 @@ module.exports = { ...@@ -145,7 +145,7 @@ module.exports = {
if (_.includes(['sync', 'pull'], this.mode)) { if (_.includes(['sync', 'pull'], this.mode)) {
const latestCommitLog = _.get(await this.git.log(['-n', '1', this.config.branch]), 'latest', {}) 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) { if (_.get(diff, 'files', []).length > 0) {
for(const item of diff.files) { for(const item of diff.files) {
const contentType = getContenType(item.file) const contentType = getContenType(item.file)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment