Fix linting issues

This commit is contained in:
jos 2019-12-11 17:12:37 +01:00
parent d2332dc308
commit c766290bf7
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ export function createQuery (json, queryOptions) {
const { sort, filter, projection } = queryOptions const { sort, filter, projection } = queryOptions
let query = '' let query = ''
if (!!filter) { if (filter) {
const examplePath = filter.field !== '@' const examplePath = filter.field !== '@'
? ['0'].concat(parsePath('.' + filter.field)) ? ['0'].concat(parsePath('.' + filter.field))
: ['0'] : ['0']
@ -33,7 +33,7 @@ export function createQuery (json, queryOptions) {
: '@' : '@'
} }
if (!!sort) { if (sort) {
if (sort.direction === 'desc') { if (sort.direction === 'desc') {
query += ' | reverse(sort_by(@, &' + sort.field + '))' query += ' | reverse(sort_by(@, &' + sort.field + '))'
} else { } else {
@ -41,7 +41,7 @@ export function createQuery (json, queryOptions) {
} }
} }
if (!!projection) { if (projection) {
if (query[query.length - 1] !== ']') { if (query[query.length - 1] !== ']') {
query += ' | [*]' query += ' | [*]'
} }