Skip to content

Commit

Permalink
simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiNyzhnyk committed Jun 9, 2022
1 parent 9fcfb9e commit 7358d95
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/index.js
Expand Up @@ -330,11 +330,9 @@ const appendDataContext = function (plugin, settings) {
/* $lab:coverage:on$ */

// append tags from document request to JSON request
if (request.query.tags) {
settings.jsonPath = appendQueryString(settings.jsonPath, 'tags', request.query.tags);
} else {
settings.jsonPath = appendQueryString(settings.jsonPath, null, null);
}
settings.jsonPath = request.query.tags
? appendQueryString(settings.jsonPath, 'tags', request.query.tags)
: appendQueryString(settings.jsonPath, null, null)

const prefixedSettings = Hoek.clone(settings);
if (routePrefix) {
Expand Down

0 comments on commit 7358d95

Please sign in to comment.