[ES-ARCHIVER] Fix bug when query flag is empty (#77983)
This commit is contained in:
parent
4dc0c128ce
commit
13bd34e2da
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue