File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
packages/node_modules/overmind/src/config Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ export function merge(...configurations: IConfiguration[]): IConfiguration {
131131 config . onInitialize ? aggr . concat ( config . onInitialize ) : aggr ,
132132 [ ] as any [ ]
133133 )
134-
134+ const rootConfiguration = configurations . shift ( )
135135 const reducedConfigurations = configurations . reduce (
136136 ( aggr , config ) => {
137137 const stateDuplicates = aggr . state
@@ -178,13 +178,11 @@ export function merge(...configurations: IConfiguration[]): IConfiguration {
178178 }
179179 } ,
180180 {
181+ ...rootConfiguration ,
181182 onInitialize : initializers . length
182183 ? ( context , value ) =>
183184 Promise . all ( initializers . map ( ( cb ) => cb ( context , value ) ) )
184185 : undefined ,
185- state : { } ,
186- effects : { } ,
187- actions : { } ,
188186 }
189187 )
190188 return reducedConfigurations
You can’t perform that action at this time.
0 commit comments