From f4327b28ea8469280132ec45858ab05adeece831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Winkelmeyer?= Date: Mon, 25 Jan 2021 08:04:56 +0100 Subject: [PATCH] fix: check for benchmarkIterations in CLI args (#245) --- packages/@best/config/src/utils/normalize.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/@best/config/src/utils/normalize.ts b/packages/@best/config/src/utils/normalize.ts index e3641e22..ef455d79 100644 --- a/packages/@best/config/src/utils/normalize.ts +++ b/packages/@best/config/src/utils/normalize.ts @@ -72,7 +72,9 @@ function setCliOptionOverrides(initialOptions: UserConfig, argsCLI: CliConfig): options.isInteractive = argsCLI[key] !== undefined ? false : undefined; break; case 'iterations': - options.benchmarkIterations = argsCLI[key]; + if (argsCLI[key] !== undefined) { + options.benchmarkIterations = argsCLI[key]; + } break; case 'runInBatch': options.runInBatch = !!argsCLI[key];