[ES-ARCHIVER] Fix bug when query flag is empty (#77983)

This commit is contained in:
Christos Nasikas 2020-09-22 10:12:24 +03:00 committed by GitHub
parent 4dc0c128ce
commit 13bd34e2da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {