Skip to content

Commit c364284

Browse files
committed
fix: config.reporter undefined bug
1 parent 809aef9 commit c364284

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/cli/src/tools/loadMetroConfig.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ export type ConfigOptionsT = {|
8282
*/
8383
export default function load(ctx: ConfigT, options?: ConfigOptionsT) {
8484
const defaultConfig = getDefaultConfig(ctx);
85-
return loadConfig(
86-
{cwd: ctx.root, ...options},
87-
{...defaultConfig, reporter: options && options.reporter},
88-
);
85+
if (options && options.reporter) {
86+
defaultConfig.reporter = options.reporter;
87+
}
88+
return loadConfig({cwd: ctx.root, ...options}, defaultConfig);
8989
}

0 commit comments

Comments
 (0)