Skip to content

Commit

Permalink
Fix bug when query is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Sep 21, 2020
1 parent 496152e commit 7a0b86e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/kbn-es-archiver/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function runCli() {

const query = flags.query;
let parsedQuery;
if (typeof query === 'string') {
if (typeof query === 'string' && query.length > 0) {
try {
parsedQuery = JSON.parse(query);
} catch (err) {
Expand Down

0 comments on commit 7a0b86e

Please sign in to comment.