File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/node_modules/overmind/src/config Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -112,17 +112,17 @@ export function merge(...configurations: IConfiguration[]): IConfiguration {
112112
113113 const reducedConfigurations = configurations . reduce (
114114 ( aggr , config ) => {
115- let stateDuplicates = aggr . state ? Object . keys ( aggr . state ) . some ( key => config . state ? Object . keys ( config . state ) . includes ( key ) : false ) : false ;
116- let actionsDuplicates = aggr . actions ? Object . keys ( aggr . actions ) . some ( key => config . actions ? Object . keys ( config . actions ) . includes ( key ) : false ) : false ;
117- let effectsDuplicates = aggr . effects ? Object . keys ( aggr . effects ) . some ( key => config . effects ? Object . keys ( config . effects ) . includes ( key ) : false ) : false ;
115+ const stateDuplicates = aggr . state ? Object . keys ( aggr . state ) . some ( key => config . state ? Object . keys ( config . state ) . includes ( key ) : false ) : false ;
116+ const actionsDuplicates = aggr . actions ? Object . keys ( aggr . actions ) . some ( key => config . actions ? Object . keys ( config . actions ) . includes ( key ) : false ) : false ;
117+ const effectsDuplicates = aggr . effects ? Object . keys ( aggr . effects ) . some ( key => config . effects ? Object . keys ( config . effects ) . includes ( key ) : false ) : false ;
118118 if ( stateDuplicates ) {
119- throw "OVERMIND ERRROR: At least one state definition contains a duplicate key"
119+ throw new Error ( "Merge conflict: at least one state definition contains a duplicate key")
120120 }
121121 if ( actionsDuplicates ) {
122- throw "OVERMIND ERRROR: At least one actions definition contains a duplicate key"
122+ throw new Error ( "Merge conflict: at least one actions definition contains a duplicate key")
123123 }
124124 if ( effectsDuplicates ) {
125- throw "OVERMIND ERRROR: At least one effects definition contains a duplicate key"
125+ throw new Error ( "Merge conflict: at least one effects definition contains a duplicate key")
126126 }
127127 return {
128128 onInitialize : aggr . onInitialize ,
You can’t perform that action at this time.
0 commit comments