From ad13f00abad59063bcc454be3e40b7e93602a304 Mon Sep 17 00:00:00 2001 From: Taylor McKinnon Date: Tue, 14 Nov 2023 13:50:52 -0800 Subject: [PATCH] f --- lib/UtapiReindex.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/UtapiReindex.js b/lib/UtapiReindex.js index 763a44f8..9a33e560 100644 --- a/lib/UtapiReindex.js +++ b/lib/UtapiReindex.js @@ -101,19 +101,18 @@ class UtapiReindex { if (this._sentinel.sentinelPassword) { flags.redis_password = this._sentinel.sentinelPassword; } - if (this._onlyCountLatestWhenObjectLocked) { - flags.only_latest_when_locked = ''; - } + /* eslint-enable camelcase */ const opts = []; Object.keys(flags) .forEach(flag => { const name = `--${flag.replace(/_/g, '-')}`; opts.push(name); - if (flags[flag] !== '') { - opts.push(flags[flag]); - } }); + + if (this._onlyCountLatestWhenObjectLocked) { + opts.push('--only-latest-when-locked'); + } return opts; }