Skip to content

Commit 59a80a1

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/cli/src/tools/loadMetroConfig.js

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

0 commit comments

Comments
 (0)