File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -121,9 +121,13 @@ export default function useAnswerStore() {
121121 const edgesJSON = { } ;
122122 row . analyses . forEach ( ( analysis ) => {
123123 const edge_bindings = Object . values ( analysis . edge_bindings ) . flat ( ) ;
124- const support_graph_edge_bindings = analysis . support_graphs . reduce ( ( acc , support_graph_id ) => (
125- [ ...acc , ...message . auxiliary_graphs [ support_graph_id ] . edges . map ( ( e ) => ( { id : e } ) ) ]
126- ) , [ ] ) ;
124+
125+ const support_graph_edge_bindings = [ ] ;
126+ if ( Array . isArray ( analysis . support_graphs ) ) {
127+ analysis . support_graphs . forEach ( ( supportGraphId ) => {
128+ support_graph_edge_bindings . push ( ...message . auxiliary_graphs [ supportGraphId ] . edges . map ( ( e ) => ( { id : e } ) ) ) ;
129+ } ) ;
130+ }
127131
128132 [ ...edge_bindings , ...support_graph_edge_bindings ] . forEach ( ( binding ) => {
129133 const kgEdge = message . knowledge_graph . edges [ binding . id ] ;
You can’t perform that action at this time.
0 commit comments