From 342b121416f8a09502eadb565ba1536950e29ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Cs=C3=A1sz=C3=A1r?= Date: Sat, 3 Aug 2024 17:49:06 +0200 Subject: [PATCH] fix(cli): don't mutate collect.settings Fixes #1067 Closes #1022 --- packages/cli/src/collect/node-runner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/collect/node-runner.js b/packages/cli/src/collect/node-runner.js index f2e36b6bf..cda78e9a2 100644 --- a/packages/cli/src/collect/node-runner.js +++ b/packages/cli/src/collect/node-runner.js @@ -42,7 +42,7 @@ class LighthouseRunner { * @return {{args: string[], cleanupFn: () => void}} */ static computeArgumentsAndCleanup(url, options) { - const settings = options.settings || {}; + const settings = {...options.settings}; const chromeFlags = options.settings && options.settings.chromeFlags; let chromeFlagsAsString = chromeFlags || ''; if (!options.headful) chromeFlagsAsString += ' --headless=new';