Commit f885734 1 parent 8151263 commit f885734 Copy full SHA for f885734
File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -127,13 +127,13 @@ const defaultInteraction = {
127
127
} ;
128
128
129
129
export const getInteraction = ( ids : string [ ] ) : Interaction => {
130
- return (
131
- find ( ( interaction : Interaction ) => {
132
- // If the difference between this substance's IDs array and our target IDs
133
- // array is empty, then this interaction is a match.
134
- return isEmpty ( difference ( interaction . ids , ids ) ) ;
135
- } ) ( interactions ) || defaultInteraction
136
- ) ;
130
+ const interaction = find ( ( interaction : Interaction ) => {
131
+ // If the difference between this substance's IDs array and our target IDs
132
+ // array is empty, then this interaction is a match.
133
+ return isEmpty ( difference ( interaction . ids , ids ) ) ;
134
+ } ) ( interactions ) ;
135
+
136
+ return isEmpty ( interaction ) ? { ... defaultInteraction , ids } : interaction ;
137
137
} ;
138
138
139
139
type Combo = [ string , string ] ;
You can’t perform that action at this time.
0 commit comments